Frees all memory associated with a given context.
Scope
The scope of this API is limited to the immediate process.
Authorization
None
Required Connection
None
Version
sql.h
C API Syntax
int sqleEndCtx ( void **ppCtx, sqlint32 lOptions, void *reserved, struct sqlca *pstSqlca); |
API Parameters
Note: | pCtx must be a valid context previously allocated by sqleBeginCtx - Create and Attach to an Application Context. |
Note: | A detach will be done even if the context is still in use. If this option is used, the ppCtx parameter can be NULL, but if passed, it must be a valid context previously allocated by sqleBeginCtx - Create and Attach to an Application Context. A call to sqleGetCurrentCtx - Get Current Context will be made, and the current context freed from there. |
Usage Notes
If a database connection exists, or the context has been attached by another thread, this call will fail.
Note: | If a context calls an API that establishes an instance attachment (for example, sqlfxdb - Get Database Configuration), it is necessary to detach from the instance using sqledtin - Detach before calling sqleEndCtx. |