FVSDK_ERROR_CODE FVSDK_FreeSession(FVSDK_Session* pSession);
Frees memory associated with a dynamically allocated FVSDK_Session structure. Prior to using this function, FVSDK_NewSession() must be called. The pSession parameter is retrieved from the FVSDK_NewSession() function.
pSession
A pointer to a valid FVSDK_Session structure, retrieved by FVSDK_NewSession().
FVSDK_OK if the session was successfully freed, error codes can be found in FVSDK_ErrorCodes.h.
// session structure pointer
FVSDK_Session* pSession;
// allocate a new session in the SDK
if (FVSDK_NewSession(&pSession) == FVSDK_OK) {
// ... do some work
// close and release the session
if (FVSDK_FreeSession(pSession) != FVSDK_OK) {
// display an error message
AfxMessageBox("Unable to free the session");
// release the allocated session; it wasn't released
delete pSession;
} // if
} // if
else
AfxMessageBox("Unable to create the new session.");