Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simcall_execution_destroy() -> simgrid::simix::Exec::unref()
[simgrid.git] / src / simix / SynchroExec.cpp
index 6dfa770..02ce125 100644 (file)
@@ -25,3 +25,15 @@ double simgrid::simix::Exec::remains()
 
   return 0;
 }
+
+void simgrid::simix::Exec::unref()
+{
+  refcount--;
+  if (refcount > 0)
+    return;
+
+  if (surf_exec)
+    surf_exec->unref();
+
+  delete this;
+}