Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug an obvious memleak, bummer
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 2 Dec 2016 08:10:37 +0000 (09:10 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 2 Dec 2016 08:10:37 +0000 (09:10 +0100)
include/simgrid/s4u/engine.hpp
src/s4u/s4u_engine.cpp

index 395ea59..07c471c 100644 (file)
@@ -27,6 +27,9 @@ namespace s4u {
  * This class is an interface to the simulation engine.
  */
 XBT_PUBLIC_CLASS Engine {
+private:
+  ~Engine();
+
 public:
   /** Constructor, taking the command line parameters of your main function */
   Engine(int *argc, char **argv);
index f28ecad..da624f5 100644 (file)
@@ -35,6 +35,11 @@ Engine::Engine(int *argc, char **argv) {
   SIMIX_global_init(argc, argv);
 }
 
+Engine::~Engine()
+{
+  delete pimpl;
+}
+
 Engine *Engine::instance() {
   if (s4u::Engine::instance_ == nullptr)
     new Engine(0,nullptr);