Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
free the libdata fabrics on exit (actually call the exit function of each libdata)
[simgrid.git] / src / gras / Virtu / process.c
index 4233436..31732a3 100644 (file)
@@ -112,7 +112,14 @@ gras_procdata_init() {
 
 void
 gras_procdata_exit() {
+  int len;
   gras_procdata_t *pd=gras_procdata_get();
 
   xbt_dict_free(&( pd->libdata ));
+  
+  /* Remove procdata in reverse order wrt creation */
+  while ((len=xbt_dynar_length(_gras_procdata_fabrics))) {
+    xbt_dynar_remove_at(_gras_procdata_fabrics,len-1,NULL);
+  }
+  xbt_dynar_free( & _gras_procdata_fabrics );
 }