Esempio n. 1
0
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);
}
Esempio n. 2
0
SimStaticClass::~SimStaticClass(void){
	CleanupLocalData();
}
void DebrisClass::CleanupData(){
	CleanupLocalData();
	BombClass::CleanupData();
}
DebrisClass::~DebrisClass(){
	CleanupLocalData();
}
Esempio n. 5
0
void EjectedPilotClass::CleanupData(){
	CleanupLocalData();
	SimMoverClass::CleanupData();
}
Esempio n. 6
0
EjectedPilotClass::~EjectedPilotClass()
{
	CleanupLocalData();
}
void FlareClass::CleanupData(){
	CleanupLocalData();
	BombClass::CleanupData();
}
FlareClass::~FlareClass(){
	CleanupLocalData();
}
Esempio n. 9
0
void GroundClass::CleanupData(){
	CleanupLocalData();
	SimVehicleClass::CleanupData();
}
Esempio n. 10
0
GroundClass::~GroundClass(){
	CleanupLocalData();
}