From: Martin Quinson Date: Tue, 26 Apr 2016 19:16:02 +0000 (+0200) Subject: plug a memleak in VM X-Git-Tag: v3_13~30^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/71b6a5d9705951c23178f8ebbf527904b9446fde plug a memleak in VM --- diff --git a/src/surf/vm_hl13.cpp b/src/surf/vm_hl13.cpp index fde670b2df..8d54b3cfa6 100644 --- a/src/surf/vm_hl13.cpp +++ b/src/surf/vm_hl13.cpp @@ -127,6 +127,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() { diff --git a/src/surf/vm_hl13.hpp b/src/surf/vm_hl13.hpp index a901656b9d..3bcd9b85c3 100644 --- a/src/surf/vm_hl13.hpp +++ b/src/surf/vm_hl13.hpp @@ -46,7 +46,7 @@ public: class VMHL13 : public VirtualMachine { public: VMHL13(VMModel *model, const char* name, sg_host_t host_PM); - ~VMHL13() {} + ~VMHL13(); void suspend() override; void resume() override;