Beispiel #1
0
Engine::~Engine()
{
	for( size_t i = 0; i < subsystems.size(); i++ )
	{
		Subsystem* system = subsystems[i];
		Deallocate(system);
	}
	
	Deallocate(physicsManager);
	Deallocate(scriptManager);
	Deallocate(renderDevice);

#ifdef ENABLE_AUDIO_OPENAL
	Deallocate(audioDevice);
#endif

	Deallocate(resourceManager);

	InputDeinitialize();
	GraphicsDeinitialize();
	ResourcesDeinitialize();
	NetworkDeinitialize();

	TaskPoolDestroy(taskPool);
	StreamDestroy(stream);
	LogDestroy(log);
}
Beispiel #2
0
int Clear(int ModuleID)
{
	void *thread_return;
	sg_quit = 1;
	pthread_mutex_destroy(&sg_sendermutex);
	pthread_join(sg_thread,&thread_return);

	//if (ModuleID == MODULE_HOSTID)
	//{
		LogDestroy();
	//}
	
	return 0;
}