Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill dead code and plug leak
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 9 Jun 2017 04:31:32 +0000 (06:31 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 9 Jun 2017 04:31:32 +0000 (06:31 +0200)
src/surf/surf_interface.cpp

index 8ee132a..0bfd73d 100644 (file)
@@ -256,11 +256,6 @@ int find_model_description(s_surf_model_description_t * table,
   return -1;
 }
 
   return -1;
 }
 
-static inline void surf_storage_free(void *r)
-{
-  delete static_cast<simgrid::surf::StorageImpl*>(r);
-}
-
 void sg_version_check(int lib_version_major, int lib_version_minor, int lib_version_patch)
 {
   if ((lib_version_major != SIMGRID_VERSION_MAJOR) || (lib_version_minor != SIMGRID_VERSION_MINOR)) {
 void sg_version_check(int lib_version_major, int lib_version_minor, int lib_version_patch)
 {
   if ((lib_version_major != SIMGRID_VERSION_MAJOR) || (lib_version_minor != SIMGRID_VERSION_MINOR)) {
@@ -378,6 +373,7 @@ void surf_exit()
     delete stype->model_properties;
     free(stype);
   }
     delete stype->model_properties;
     free(stype);
   }
+  delete simgrid::surf::StorageImpl::storages;
 
   for (auto model : *all_existing_models)
     delete model;
 
   for (auto model : *all_existing_models)
     delete model;