Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Delete the CPU (fix a mem leak)
[simgrid.git] / src / s4u / s4u_host.cpp
index 48b5176..a21b4d0 100644 (file)
@@ -41,6 +41,7 @@ Host::Host(const char* name)
 }
 
 Host::~Host() {
+       delete pimpl_cpu;
        if (mounts != NULL)
                delete mounts;
 }
@@ -65,7 +66,7 @@ void Host::turn_on() {
 }
 
 void Host::turn_off() {
-       simgrid::simix::simcall<void>(SIMCALL_HOST_OFF, this);
+  simgrid::simix::kernel(std::bind(SIMIX_host_off, this, SIMIX_process_self()));
 }
 
 bool Host::is_on() {