lxaCloseSalienceSession

<< lxaOpenSalienceSession | Back to Salience 6 C API Index | lxaGetSalienceVersion >>

Summary

Closes the Salience session. Call this function when you finished to free up all the allocated resources.

Syntax

int lxaCloseSalienceSession(SalienceSession *pSession);

Parameters

pSession Pointer to the SalienceSession structure

Returns

Integer return code.

Example

     char* acPath = "/path/to/content";
     char* acLicensePath = "/path/to/license/file";
     char* acDataDirectory = "/path/to/data/directory";
     char* acError;

     LexalyticsLicense oLicense;
     if(lxaLoadLicense(acLicensePath, &oLicense, &acError) != LXA_OK)
     {
          std::cout << acError << std::endl;
          return 1;
     }

     SalienceSessionStartup oStartup;
     strcpy(oStartup.acDataDirectory, acDataDirectory);
     oStartup.nStartupLog = 1;

     SalienceSession* pSession; 
     if(lxaOpenSalienceSession(oLicense, &oStartup, &pSession) != LXA_OK)
          return 1;
     ...
     lxaCloseSalienceSession(pSession);

<< lxaOpenSalienceSession | Back to Salience 6 C API Index | lxaGetSalienceVersion >>