From: Arnaud Giersch Date: Thu, 6 Mar 2014 11:56:54 +0000 (+0100) Subject: Correctly destroy tasks. X-Git-Tag: v3_11~242^2~9 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6762714f898f1801ddc8b729973f01e83146baf3 Correctly destroy tasks. --- diff --git a/teshsuite/msg/task_destroy_cancel.c b/teshsuite/msg/task_destroy_cancel.c index 9c5f5af664..6dda8b5a96 100644 --- a/teshsuite/msg/task_destroy_cancel.c +++ b/teshsuite/msg/task_destroy_cancel.c @@ -38,6 +38,7 @@ int master(int argc, char *argv[]) task = MSG_task_create("cancel directly", task_comp_size, task_comm_size, NULL); XBT_INFO("Canceling task \"%s\" directly", task->name); MSG_task_cancel(task); + MSG_task_destroy(task); task = MSG_task_create("destroy directly", task_comp_size, task_comm_size, NULL); XBT_INFO("Destroying task \"%s\" directly", task->name); @@ -54,6 +55,7 @@ int master(int argc, char *argv[]) xbt_ex_free(ex); MSG_comm_destroy(comm); } + MSG_task_destroy(task); task = MSG_task_create("finalize", task_comp_size, task_comm_size, NULL); comm = MSG_task_isend(task, mailbox); @@ -84,6 +86,7 @@ static int worker_main(int argc, char *argv[]) XBT_INFO("Start %s", task->name); res = MSG_task_execute(task); XBT_INFO("Task %s", res == MSG_OK ? "done" : "failed"); + MSG_task_destroy(task); return 0; }