Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SURF] NULL -> nullptr substitution
[simgrid.git] / src / surf / vm_hl13.cpp
index fde670b..399d2ce 100644 (file)
@@ -4,8 +4,6 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include <algorithm>
-
 #include <simgrid/host.h>
 
 #include "cpu_cas01.hpp"
@@ -99,7 +97,7 @@ VMHL13::VMHL13(VMModel *model, const char* name, sg_host_t host_PM)
  : VirtualMachine(model, name, host_PM)
 {
   /* Currently, we assume a VM has no storage. */
-  p_storage = NULL;
+  p_storage = nullptr;
 
   /* Currently, a VM uses the network resource of its physical host. In
    * host_lib, this network resource object is referred from two different keys.
@@ -127,6 +125,9 @@ VMHL13::VMHL13(VMModel *model, const char* name, sg_host_t host_PM)
 
   XBT_VERB("Create VM(%s)@PM(%s) with %ld mounted disks", name, hostPM_->name().c_str(), xbt_dynar_length(p_storage));
 }
+VMHL13::~VMHL13() {
+  delete p_cpu;
+}
 
 void VMHL13::suspend()
 {