Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[simix] Create actors by value (instead of new()-ing and leaking them)
[simgrid.git] / examples / s4u / basic / s4u_basic.cpp
index 991b3f7..c08cd6d 100644 (file)
@@ -34,8 +34,8 @@ public:
 int main(int argc, char **argv) {
   simgrid::s4u::Engine *e = new simgrid::s4u::Engine(&argc,argv);
   e->loadPlatform("../../platforms/two_hosts.xml");
-  new simgrid::s4u::Actor("worker", simgrid::s4u::Host::by_name("Tremblay"), Worker());
-  new simgrid::s4u::Actor("master", simgrid::s4u::Host::by_name("Jupiter"), 0, Master());
+  simgrid::s4u::Actor("worker", simgrid::s4u::Host::by_name("Tremblay"), Worker());
+  simgrid::s4u::Actor("master", simgrid::s4u::Host::by_name("Jupiter"), 0, Master());
   e->run();
   return 0;
 }