Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
let base class dtor deal with surf action
[simgrid.git] / src / kernel / activity / ActivityImpl.cpp
index 5b5c614..757667b 100644 (file)
@@ -11,6 +11,15 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
+ActivityImpl::~ActivityImpl()
+{
+  if (surf_action_) {
+    surf_action_->unref();
+    XBT_DEBUG("Destroy activity %p", this);
+    surf_action_ = nullptr;
+  }
+}
+
 void ActivityImpl::suspend()
 {
   if (surf_action_ == nullptr)