X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d0e24e71be9100371207e703e25cab7d612f521c..ccc1670e4bf36086f1f524b5ef004d5210415488:/src/surf/cpu_interface.cpp?ds=sidebyside diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 0142878a73..bd28c4d289 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -191,8 +191,15 @@ Cpu::Cpu(Model *model, const char *name, : Cpu(model, name, core, speedPeak, speedScale, SURF_RESOURCE_ON) {} -Cpu::~Cpu(){ +void Cpu::onDie() +{ surf_callback_emit(cpuDestructedCallbacks, this); + Resource::onDie(); +} + +Cpu::~Cpu() +{ + this->die(); if (p_constraintCoreId){ for (int i = 0; i < m_core; i++) { xbt_free(p_constraintCoreId[i]);