Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make it clearer that there's no memory leak here.
[simgrid.git] / src / s4u / s4u_engine.cpp
index 7695d85..39e5922 100644 (file)
@@ -48,8 +48,9 @@ Engine::~Engine()
 Engine* Engine::getInstance()
 {
   if (s4u::Engine::instance_ == nullptr)
-    new Engine(0,nullptr);
-  return s4u::Engine::instance_;
+    return new Engine(0, nullptr);
+  else
+    return s4u::Engine::instance_;
 }
 
 void Engine::shutdown() {