Index: source/Target/Process.cpp =================================================================== --- source/Target/Process.cpp +++ source/Target/Process.cpp @@ -835,11 +835,7 @@ { // NOTE: intentional leak so we don't crash if global destructor chain gets // called as other threads still use the result of this function - static ProcessPropertiesSP *g_settings_sp_ptr = nullptr; - static std::once_flag g_once_flag; - std::call_once(g_once_flag, []() { - g_settings_sp_ptr = new ProcessPropertiesSP(new ProcessProperties (NULL)); - }); + static ProcessPropertiesSP *g_settings_sp_ptr = new ProcessPropertiesSP(new ProcessProperties (NULL)); return *g_settings_sp_ptr; } Index: source/Target/Target.cpp =================================================================== --- source/Target/Target.cpp +++ source/Target/Target.cpp @@ -2780,11 +2780,7 @@ { // NOTE: intentional leak so we don't crash if global destructor chain gets // called as other threads still use the result of this function - static TargetPropertiesSP *g_settings_sp_ptr = nullptr; - static std::once_flag g_once_flag; - std::call_once(g_once_flag, []() { - g_settings_sp_ptr = new TargetPropertiesSP(new TargetProperties(nullptr)); - }); + static TargetPropertiesSP *g_settings_sp_ptr = new TargetPropertiesSP(new TargetProperties(nullptr)); return *g_settings_sp_ptr; } Index: source/Target/Thread.cpp =================================================================== --- source/Target/Thread.cpp +++ source/Target/Thread.cpp @@ -61,11 +61,7 @@ { // NOTE: intentional leak so we don't crash if global destructor chain gets // called as other threads still use the result of this function - static ThreadPropertiesSP *g_settings_sp_ptr = nullptr; - static std::once_flag g_once_flag; - std::call_once(g_once_flag, []() { - g_settings_sp_ptr = new ThreadPropertiesSP(new ThreadProperties (true)); - }); + static ThreadPropertiesSP *g_settings_sp_ptr = new ThreadPropertiesSP(new ThreadProperties (true)); return *g_settings_sp_ptr; }