version 1.25, 2006/01/30 16:18:04
|
version 1.25.2.1, 2006/06/16 19:46:24
|
|
|
*/ | */ |
void CMPIProvider::_terminate(Boolean terminating) | void CMPIProvider::_terminate(Boolean terminating) |
{ | { |
{ |
|
WriteLock writeLock (broker.rwsemClassCache); |
|
|
|
if (broker.clsCache) { |
|
ClassCache::Iterator i=broker.clsCache->start(); |
|
for (; i; i++) { |
|
delete i.value(); |
|
} |
|
delete broker.clsCache; |
|
broker.clsCache=NULL; |
|
} |
|
} |
|
|
|
const OperationContext opc; | const OperationContext opc; |
CMPIStatus rc={CMPI_RC_OK,NULL}; | CMPIStatus rc={CMPI_RC_OK,NULL}; |
CMPI_ContextOnStack eCtx(opc); | CMPI_ContextOnStack eCtx(opc); |
|
|
if (rc.rc==CMPI_RC_ERR_NOT_SUPPORTED) noUnload=true; | if (rc.rc==CMPI_RC_ERR_NOT_SUPPORTED) noUnload=true; |
if ((rc.rc == CMPI_RC_DO_NOT_UNLOAD) || (rc.rc==CMPI_RC_NEVER_UNLOAD)) noUnload =true; | if ((rc.rc == CMPI_RC_DO_NOT_UNLOAD) || (rc.rc==CMPI_RC_NEVER_UNLOAD)) noUnload =true; |
} | } |
|
|
if (noUnload == false) | if (noUnload == false) |
{ | { |
|
// Cleanup the class cache |
|
{ |
|
WriteLock writeLock (broker.rwsemClassCache); |
|
|
|
if (broker.clsCache) { |
|
ClassCache::Iterator i=broker.clsCache->start(); |
|
for (; i; i++) { |
|
delete i.value(); |
|
} |
|
delete broker.clsCache; |
|
broker.clsCache=NULL; |
|
} |
|
} |
|
|
// Check the thread list to make sure the thread has been de-allocated | // Check the thread list to make sure the thread has been de-allocated |
if (_threadWatchList.size() != 0) | if (_threadWatchList.size() != 0) |
{ | { |