Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make it clear to static analyzers that this mem is not leaked
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 5 Jul 2017 15:31:44 +0000 (17:31 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 5 Jul 2017 15:31:44 +0000 (17:31 +0200)
17 files changed:
examples/s4u/actions-comm/s4u_actions-comm.cpp
examples/s4u/actions-storage/s4u_actions-storage.cpp
examples/s4u/actor-daemon/s4u_actor-daemon.cpp
examples/s4u/actor-kill/s4u_actor-kill.cpp
examples/s4u/actor-migration/s4u_actor-migration.cpp
examples/s4u/actor-suspend/s4u_actor-suspend.cpp
examples/s4u/app-masterworker/s4u_app-masterworker.cpp
examples/s4u/app-token-ring/s4u_app-token-ring.cpp
examples/s4u/dht-chord/s4u_dht-chord.cpp
examples/s4u/io/s4u_io.cpp
examples/s4u/mutex/s4u_mutex.cpp
teshsuite/s4u/actor/actor.cpp
teshsuite/s4u/concurrent_rw/concurrent_rw.cpp
teshsuite/s4u/host_on_off_wait/host_on_off_wait.cpp
teshsuite/s4u/listen_async/listen_async.cpp
teshsuite/s4u/pid/pid.cpp
teshsuite/s4u/storage_client_server/storage_client_server.cpp

index 44b42d1..523f3a4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -117,5 +117,6 @@ int main(int argc, char *argv[])
 
   XBT_INFO("Simulation time %g", e->getClock());
 
 
   XBT_INFO("Simulation time %g", e->getClock());
 
+  delete e;
   return 0;
 }
   return 0;
 }
index 21f9e13..3b48581 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2017. The SimGrid Team. All rights reserved.               */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -133,5 +133,6 @@ int main(int argc, char* argv[])
 
   XBT_INFO("Simulation time %g", e->getClock());
 
 
   XBT_INFO("Simulation time %g", e->getClock());
 
+  delete e;
   return 0;
 }
   return 0;
 }
index bc075a6..b415f28 100644 (file)
@@ -40,6 +40,5 @@ int main(int argc, char* argv[])
   e->run();
 
   delete e;
   e->run();
 
   delete e;
-
   return 0;
 }
   return 0;
 }
index 16794c7..e6a77aa 100644 (file)
@@ -48,5 +48,7 @@ int main(int argc, char* argv[])
   e->run(); /* - Run the simulation */
 
   XBT_INFO("Simulation time %g", e->getClock());
   e->run(); /* - Run the simulation */
 
   XBT_INFO("Simulation time %g", e->getClock());
+
+  delete e;
   return 0;
 }
   return 0;
 }
index 5db96c6..f0fe008 100644 (file)
@@ -72,5 +72,6 @@ int main(int argc, char* argv[])
 
   XBT_INFO("Simulation time %g", e->getClock());
 
 
   XBT_INFO("Simulation time %g", e->getClock());
 
+  delete e;
   return 0;
 }
   return 0;
 }
index a4d6dc4..0c59d04 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2017. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2017. The SimGrid Team. All rights reserved.               */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -77,5 +76,6 @@ int main(int argc, char* argv[])
 
   e->run(); /* - Run the simulation */
 
 
   e->run(); /* - Run the simulation */
 
+  delete e;
   return 0;
 }
   return 0;
 }
index bc5d34a..776425d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -102,5 +102,6 @@ int main(int argc, char* argv[])
 
   XBT_INFO("Simulation time %g", e->getClock());
 
 
   XBT_INFO("Simulation time %g", e->getClock());
 
+  delete e;
   return 0;
 }
   return 0;
 }
index 266b60c..c2d375b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2017. The SimGrid Team. All rights reserved.               */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -66,5 +66,7 @@ int main(int argc, char** argv)
   }
   e->run();
   XBT_INFO("Simulation time %g", e->getClock());
   }
   e->run();
   XBT_INFO("Simulation time %g", e->getClock());
+
+  delete e;
   return 0;
 }
   return 0;
 }
index db79af6..2c5ed69 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -76,5 +76,6 @@ int main(int argc, char* argv[])
 
   chord_exit();
 
 
   chord_exit();
 
+  delete e;
   return 0;
 }
   return 0;
 }
index d9cd197..a09685d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2015. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -87,5 +87,6 @@ int main(int argc, char **argv)
   e->loadPlatform("../../platforms/storage/storage.xml");
   simgrid::s4u::Actor::createActor("host", simgrid::s4u::Host::by_name("denise"), MyHost());
   e->run();
   e->loadPlatform("../../platforms/storage/storage.xml");
   simgrid::s4u::Actor::createActor("host", simgrid::s4u::Host::by_name("denise"), MyHost());
   e->run();
+  delete e;
   return 0;
 }
   return 0;
 }
index 5e38484..2f2afd9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2015. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -64,5 +64,7 @@ int main(int argc, char **argv)
   e->loadPlatform("../../platforms/two_hosts.xml");
   simgrid::s4u::Actor::createActor("main", simgrid::s4u::Host::by_name("Tremblay"), master);
   e->run();
   e->loadPlatform("../../platforms/two_hosts.xml");
   simgrid::s4u::Actor::createActor("main", simgrid::s4u::Host::by_name("Tremblay"), master);
   e->run();
+
+  delete e;
   return 0;
 }
   return 0;
 }
index 3be9b12..c742c2b 100644 (file)
@@ -62,5 +62,6 @@ int main(int argc, char* argv[])
   e->run();
   XBT_INFO("Simulation time %g", e->getClock());
 
   e->run();
   XBT_INFO("Simulation time %g", e->getClock());
 
+  delete e;
   return 0;
 }
   return 0;
 }
index 82a0ca8..692701a 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2008-2010, 2012-2015, 2017. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2008-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -50,5 +49,6 @@ int main(int argc, char** argv)
   e->run();
   XBT_INFO("Simulation time %g", e->getClock());
 
   e->run();
   XBT_INFO("Simulation time %g", e->getClock());
 
+  delete e;
   return 0;
 }
   return 0;
 }
index 31f1bbc..17f378d 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2010-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -37,5 +36,7 @@ int main(int argc, char* argv[])
 
   e->run();
   XBT_INFO("Simulation time %g", e->getClock());
 
   e->run();
   XBT_INFO("Simulation time %g", e->getClock());
+
+  delete e;
   return 0;
 }
   return 0;
 }
index 991f201..c1a0364 100644 (file)
@@ -51,5 +51,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::createActor("test", simgrid::s4u::Host::by_name("Tremblay"), server);
 
   e->run();
   simgrid::s4u::Actor::createActor("test", simgrid::s4u::Host::by_name("Tremblay"), server);
 
   e->run();
+
+  delete e;
   return 0;
 }
   return 0;
 }
index fc5882d..02a5734 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2009-2010, 2013-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -55,5 +54,6 @@ int main(int argc, char* argv[])
 
   e->run();
 
 
   e->run();
 
+  delete e;
   return 0;
 }
   return 0;
 }
index 0dcfafd..a7316d0 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2013-2015, 2017. The    SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -173,5 +172,6 @@ int main(int argc, char* argv[])
 
   XBT_INFO("Simulated time: %g", e->getClock());
 
 
   XBT_INFO("Simulated time: %g", e->getClock());
 
+  delete e;
   return 0;
 }
   return 0;
 }