Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
destroy all hosts before destroying the engine (fix #185)
[simgrid.git] / examples / s4u / actor-create / s4u_actor-create.cpp
index a20f02e..f6700b0 100644 (file)
@@ -77,6 +77,8 @@ public:
     char* msg1 = static_cast<char*>(simgrid::s4u::this_actor::recv(mailbox));
     char* msg2 = static_cast<char*>(simgrid::s4u::this_actor::recv(mailbox));
     XBT_INFO("I received '%s' and '%s'", msg1, msg2);
+    xbt_free(msg1);
+    xbt_free(msg2);
     XBT_INFO("I'm done. See you.");
   }
 };
@@ -112,5 +114,6 @@ int main(int argc, char** argv)
   e->run();
 
   /* Once the simulation is done, the program is ended */
+  e->shutdown();
   return 0;
 }