Browse Source

Destroy tasks after they have been executed.

Cyril Roelandt 13 years ago
parent
commit
ca5aaba3f2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      tests/datawizard/sync_and_notify_data.c

+ 3 - 0
tests/datawizard/sync_and_notify_data.c

@@ -2,6 +2,7 @@
  *
  * Copyright (C) 2010  Université de Bordeaux 1
  * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012 inria
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -140,6 +141,7 @@ int main(int argc, char **argv)
 			ret = starpu_task_submit(task);
 			if (ret == -ENODEV) goto enodev;
 			STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
+			starpu_task_destroy(task);
 		}
 
 		/* synchronize v in RAM */
@@ -182,6 +184,7 @@ int main(int argc, char **argv)
 			ret = starpu_task_submit(task);
 			if (ret == -ENODEV) goto enodev;
 			STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
+			starpu_task_destroy(task);
 		}
 
 	}