mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:29:50 +00:00
Make the TaskManager a automatic livetime object
This way the destructor can be used for cleanup.
This commit is contained in:
+1
-3
@@ -576,7 +576,7 @@ static void RunGameOrAtlas(const PS::span<const char* const> argv)
|
||||
CXeromycesEngine xeromycesEngine;
|
||||
|
||||
// Initialise the global task manager at this point (JS & Profiler2 are set up).
|
||||
Threading::TaskManager::Initialise();
|
||||
Threading::TaskManager taskManager;
|
||||
|
||||
if (ATLAS_RunIfOnCmdLine(args, false))
|
||||
return;
|
||||
@@ -719,8 +719,6 @@ static void RunGameOrAtlas(const PS::span<const char* const> argv)
|
||||
if (g_Shutdown == ShutdownType::RestartAsAtlas)
|
||||
ATLAS_RunIfOnCmdLine(args, true);
|
||||
#endif
|
||||
|
||||
Threading::TaskManager::Instance().ClearQueue();
|
||||
}
|
||||
|
||||
#if OS_ANDROID
|
||||
|
||||
Reference in New Issue
Block a user