From: Martin Quinson Date: Fri, 20 Jan 2017 10:53:21 +0000 (+0100) Subject: plug a memleak X-Git-Tag: v3_15~531 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/369500dc80d41e11840ca649b08b6b3c28e9ddbc plug a memleak This one is vicious and I should cleanup the VM and Host interactions. one day. --- diff --git a/src/surf/HostImpl.cpp b/src/surf/HostImpl.cpp index cf09097b38..cd491cc514 100644 --- a/src/surf/HostImpl.cpp +++ b/src/surf/HostImpl.cpp @@ -93,6 +93,8 @@ Action* HostModel::executeParallelTask(int host_nb, simgrid::s4u::Host** host_li ************/ HostImpl::HostImpl(s4u::Host* host) : piface_(host) { + /* The VM wants to reinstall a new HostImpl, but we don't want to leak the previously existing one */ + delete piface_->pimpl_; piface_->pimpl_ = this; }