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