A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Cannot destroy iface before impl.
[simgrid.git]
/
src
/
plugins
/
vm
/
s4u_VirtualMachine.cpp
diff --git
a/src/plugins/vm/s4u_VirtualMachine.cpp
b/src/plugins/vm/s4u_VirtualMachine.cpp
index
f3c7658
..
88d7f49
100644
(file)
--- a/
src/plugins/vm/s4u_VirtualMachine.cpp
+++ b/
src/plugins/vm/s4u_VirtualMachine.cpp
@@
-60,8
+60,6
@@
VirtualMachine::~VirtualMachine()
{
on_destruction(*this);
- XBT_DEBUG("destroy %s", get_cname());
-
/* Don't free these things twice: they are the ones of my physical host */
set_netpoint(nullptr);
}
@@
-128,11
+126,12
@@
void VirtualMachine::destroy()
/* First, terminate all processes on the VM if necessary */
shutdown();
+ XBT_DEBUG("destroy %s", get_cname());
+
/* Then, destroy the VM object */
kernel::actor::simcall([this]() {
- auto impl = get_impl();
- delete this; // delete iface first
- impl->destroy();
+ get_impl()->destroy();
+ delete this;
});
}