void asCThreadManager::Unprepare() { asASSERT(threadManager); if( threadManager == 0 ) return; // It's necessary to protect this section so no // other thread attempts to call AddRef or Release // while clean up is in progress. ENTERCRITICALSECTION(threadManager->criticalSection); if( --threadManager->refCount == 0 ) { // Make sure the local data is destroyed, at least for the current thread CleanupLocalData(); // As the critical section will be destroyed together // with the thread manager we must first clear the global // variable in case a new thread manager needs to be created; asCThreadManager *mgr = threadManager; threadManager = 0; // Leave the critical section before it is destroyed LEAVECRITICALSECTION(mgr->criticalSection); asDELETE(mgr,asCThreadManager); } else LEAVECRITICALSECTION(threadManager->criticalSection); }
SimStaticClass::~SimStaticClass(void){ CleanupLocalData(); }
void DebrisClass::CleanupData(){ CleanupLocalData(); BombClass::CleanupData(); }
DebrisClass::~DebrisClass(){ CleanupLocalData(); }
void EjectedPilotClass::CleanupData(){ CleanupLocalData(); SimMoverClass::CleanupData(); }
EjectedPilotClass::~EjectedPilotClass() { CleanupLocalData(); }
void FlareClass::CleanupData(){ CleanupLocalData(); BombClass::CleanupData(); }
FlareClass::~FlareClass(){ CleanupLocalData(); }
void GroundClass::CleanupData(){ CleanupLocalData(); SimVehicleClass::CleanupData(); }
GroundClass::~GroundClass(){ CleanupLocalData(); }