Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Triggers the destructed callbacks on the full object
[simgrid.git] / src / surf / host_interface.cpp
index 134e106..7e9985a 100644 (file)
@@ -107,8 +107,15 @@ Host::Host(simgrid::surf::Model *model, const char *name, xbt_dict_t props, lmm_
   p_params.ramsize = 0;
 }
 
   p_params.ramsize = 0;
 }
 
-Host::~Host(){
+void Host::onDie()
+{
   surf_callback_emit(hostDestructedCallbacks, this);
   surf_callback_emit(hostDestructedCallbacks, this);
+  Resource::onDie();
+}
+
+Host::~Host()
+{
+  this->die();
 }
 
 void Host::attach(simgrid::Host* host)
 }
 
 void Host::attach(simgrid::Host* host)