Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug a huge memleak in regular communications
[simgrid.git] / src / kernel / activity / ActivityImpl.cpp
index e672384..08e2a63 100644 (file)
@@ -13,13 +13,15 @@ void simgrid::kernel::activity::ActivityImpl::ref()
   refcount++;
 }
 
-void simgrid::kernel::activity::ActivityImpl::unref()
+bool simgrid::kernel::activity::ActivityImpl::unref()
 {
   xbt_assert(refcount > 0,
       "This activity has a negative refcount! You can only call test() or wait() once per activity.");
 
   refcount--;
   if (refcount>0)
-    return;
+    return false;
   delete this;
+
+  return true;
 }