ctdbFreeDatabase
Release all resources associated with a database handle
Declaration
void ctdbFreeDatabase(CTHANDLE Handle)
Description
ctdbFreeDatabase() releases all resources associated with a database handle. After a call to ctdbFreeDatabase(), the database handle cannot be used for other operations. For each ctdbAllocDatabase() call, there must be a ctdbFreeDatabase() call. Note that if you free / release an active database handle (one that is currently connected to a database), this function will automatically close all tables associated with that database and disconnect that database from the handle before releasing the handle’s resources.
Returns
None.
Example
CTHANDLE hDatabase = ctdbAllocDatabase(hSession);
ctdbCreateDatabase(hDatabase, "Database1", "");
ctdbFreeDatabase(hDatabase); // the handle cannot be used anymore
See also
ctdbAllocDatabase(), ctdbFreeSession()