Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug an obvious memleak, bummer
[simgrid.git] / src / s4u / s4u_engine.cpp
index ad67fbd..da624f5 100644 (file)
@@ -29,12 +29,17 @@ Engine *Engine::instance_ = nullptr; /* That singleton is awful, but I don't see
 Engine::Engine(int *argc, char **argv) {
   xbt_assert(s4u::Engine::instance_ == nullptr, "It is currently forbidden to create more than one instance of s4u::Engine");
   s4u::Engine::instance_ = this;
-  // pimpl                  = new kernel::EngineImpl();
+  pimpl                  = new kernel::EngineImpl();
 
   TRACE_global_init(argc, argv);
   SIMIX_global_init(argc, argv);
 }
 
+Engine::~Engine()
+{
+  delete pimpl;
+}
+
 Engine *Engine::instance() {
   if (s4u::Engine::instance_ == nullptr)
     new Engine(0,nullptr);