Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
merge xbt/ex.hpp into simgrid/exception.hpp
[simgrid.git] / examples / s4u / platform-failures / s4u-platform-failures.cpp
index 72ac685..22c4d24 100644 (file)
@@ -4,7 +4,6 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "simgrid/s4u.hpp"
-#include "xbt/ex.hpp"
 #include "xbt/str.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example");
@@ -99,6 +98,7 @@ static int worker(int argc, char* argv[])
         XBT_INFO("Start execution...");
         simgrid::s4u::this_actor::execute(comp_size);
         XBT_INFO("Execution complete.");
+        delete payload;
       } catch (xbt_ex& e) {
         if (e.category == host_error) {
           XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
@@ -120,7 +120,6 @@ static int worker(int argc, char* argv[])
           xbt_die("Unexpected behavior");
       }
     }
-    delete payload;
   }
   return 0;
 }