Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[s4u] Do not need to check for NULL before delet
[simgrid.git] / src / s4u / s4u_host.cpp
index 48b517621a5684c1a70fdf66c7c3e6e8777a9df3..3842d674e97e220503e1e0f82598831c1bfbcd57 100644 (file)
@@ -41,8 +41,8 @@ Host::Host(const char* name)
 }
 
 Host::~Host() {
-       if (mounts != NULL)
-               delete mounts;
+       delete pimpl_cpu;
+       delete mounts;
 }
 
 Host *Host::by_name(std::string name) {
@@ -65,7 +65,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() {