Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug leaks
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 22 Nov 2017 06:18:30 +0000 (07:18 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 22 Nov 2017 06:18:30 +0000 (07:18 +0100)
teshsuite/msg/task_progress/task_progress.cpp

index 7c3ad78..c681ec9 100644 (file)
@@ -31,6 +31,7 @@ static int seq_task(int /*argc*/, char* /*argv*/ [])
   progress = MSG_task_get_remaining_work_ratio(task);
   xbt_assert(progress == 0, "Progress should be equal to 1 not %f", progress);
 
   progress = MSG_task_get_remaining_work_ratio(task);
   xbt_assert(progress == 0, "Progress should be equal to 1 not %f", progress);
 
+  MSG_task_destroy(task);
   XBT_INFO("Goodbye now!");
   return 0;
 }
   XBT_INFO("Goodbye now!");
   return 0;
 }
@@ -59,6 +60,10 @@ static int par_task(int /*argc*/, char* /*argv*/ [])
   progress = MSG_task_get_remaining_work_ratio(task);
   xbt_assert(progress == 0, "Progress should be equal to 1 not %f", progress);
 
   progress = MSG_task_get_remaining_work_ratio(task);
   xbt_assert(progress == 0, "Progress should be equal to 1 not %f", progress);
 
+  MSG_task_destroy(task);
+  delete[] computation_amount;
+  delete[] communication_amount;
+
   XBT_INFO("Goodbye now!");
   return 0;
 }
   XBT_INFO("Goodbye now!");
   return 0;
 }