+ delete pimpl_netcard when freeing a host
+ As the netcard of a physical host is shared by VMs running on it,
it leads to double frees.
+ A solution is to explicity destroy the VMs when they are not needed
anymore.
If one doesn't like it, feel free to simplify the VM stuff ;)
for (int i = 0; i < vms.size(); i++) {
vms.get(i).shutdown();
+ vms.get(i).finalize();
}
Msg.info("Master done.");
}
vmHost1.shutdown();
vmHost3.shutdown();
+ vmHost1.finalize();
+ vmHost3.finalize();
}
}
MSG_vm_shutdown(vm_host1);
MSG_vm_shutdown(vm_host3);
+ MSG_vm_destroy(vm_host1);
+ MSG_vm_destroy(vm_host3);
return 0;
}
Host::~Host() {
delete pimpl_cpu;
+ delete pimpl_netcard;
delete mounts;
}