Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] fix, free memory even if user requests the non-destruction of containers
authorLucas Schnorr <Lucas.Schnorr@imag.fr>
Thu, 16 Jun 2011 10:59:07 +0000 (12:59 +0200)
committerLucas Schnorr <Lucas.Schnorr@imag.fr>
Thu, 16 Jun 2011 10:59:07 +0000 (12:59 +0200)
src/instr/instr_config.c
src/instr/instr_paje.c

index 2259d51..fa2569b 100644 (file)
@@ -107,9 +107,7 @@ int TRACE_end()
   TRACE_paje_dump_buffer(1);
 
   /* destroy all data structures of tracing (and free) */
-  if (!TRACE_disable_destroy()){
-    destroyAllContainers();
-  }
+  destroyAllContainers();
 
   /* close the trace file */
   TRACE_paje_end();
index 1bc7133..3c1591c 100644 (file)
@@ -310,7 +310,10 @@ void destroyContainer (container_t container)
   TRACE_paje_dump_buffer(1);
 
   //trace my destruction
-  new_pajeDestroyContainer(container);
+  if (!TRACE_disable_destroy()){
+    //do not trace the container destruction if user requests
+    new_pajeDestroyContainer(container);
+  }
 
   //free
   xbt_free (container->name);