Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Shutdown Engine first, and fix double-free errors.
[simgrid.git] / src / surf / surf_interface.cpp
index 9c92c1d..02dfd42 100644 (file)
@@ -321,7 +321,7 @@ void surf_exit()
 {
   TRACE_end();                  /* Just in case it was not called by the upper layer (or there is no upper layer) */
 
-  sg_host_exit();
+  simgrid::s4u::Engine::shutdown();
   sg_link_exit();
   for (auto const& e : storage_types) {
     simgrid::surf::StorageType* stype = e.second;
@@ -346,7 +346,6 @@ void surf_exit()
 
   tmgr_finalize();
   sg_platf_exit();
-  simgrid::s4u::Engine::shutdown();
 
   NOW = 0;                      /* Just in case the user plans to restart the simulation afterward */
 }
@@ -376,6 +375,8 @@ Model::~Model(){
   delete runningActionSet_;
   delete failedActionSet_;
   delete doneActionSet_;
+  delete modifiedSet_;
+  delete maxminSystem_;
 }
 
 Action* Model::actionHeapPop()