| 328 | } |
| 329 | |
| 330 | void StandardMainLoop::shutdown() |
| 331 | { |
| 332 | // Stop the Input Event Manager |
| 333 | INPUTMGR->stop(); |
| 334 | |
| 335 | delete tm; |
| 336 | preShutdown(); |
| 337 | |
| 338 | // Unregister the module database. |
| 339 | ModuleDatabase.unregisterObject(); |
| 340 | |
| 341 | // Unregister the asset database. |
| 342 | AssetDatabase.unregisterObject(); |
| 343 | |
| 344 | // Shut down modules. |
| 345 | |
| 346 | EngineModuleManager::shutdownSystem(); |
| 347 | |
| 348 | ThreadPool::GlobalThreadPool::deleteSingleton(); |
| 349 | |
| 350 | #ifdef TORQUE_ENABLE_VFS |
| 351 | closeEmbeddedVFSArchive(); |
| 352 | #endif |
| 353 | |
| 354 | RedBook::destroy(); |
| 355 | |
| 356 | Platform::shutdown(); |
| 357 | |
| 358 | #if defined( _XBOX ) || defined( TORQUE_OS_MAC ) |
| 359 | DebugOutputConsumer::destroy(); |
| 360 | #endif |
| 361 | |
| 362 | NetStringTable::destroy(); |
| 363 | Con::shutdown(); |
| 364 | |
| 365 | _StringTable::destroy(); |
| 366 | FrameAllocator::destroy(); |
| 367 | Net::shutdown(); |
| 368 | Sampler::destroy(); |
| 369 | |
| 370 | ManagedSingleton< ThreadManager >::deleteSingleton(); |
| 371 | |
| 372 | // asserts should be destroyed LAST |
| 373 | PlatformAssert::destroy(); |
| 374 | |
| 375 | #if defined( TORQUE_DEBUG ) && !defined( TORQUE_DISABLE_MEMORY_MANAGER ) |
| 376 | Memory::validate(); |
| 377 | #endif |
| 378 | } |
| 379 | |
| 380 | void StandardMainLoop::preShutdown() |
| 381 | { |
no test coverage detected