fclose(msg_global->paje_output);
msg_global->paje_output = NULL;
}
+ msg_config_finalize();
free(msg_global);
surf_exit();
xbt_cfg_set_string(_msg_cfg_set,"surf_workstation_model", "CLM03");
}
+void msg_config_finalize(void) {
+
+ if (!_msg_init_status)
+ return; /* Not initialized yet. Nothing to do */
+
+ xbt_cfg_free(&_msg_cfg_set);
+ _msg_init_status = 0;
+}
+
/** \brief set a configuration variable
*
* Currently existing configuation variable:
/************************** Configuration support ********************************/
void msg_config_init(void); /* create the config set, call this before use! */
+void msg_config_finalize(void); /* destroy the config set, call this at cleanup. */
extern int _msg_init_status; /* 0: beginning of time;
1: pre-inited (cfg_set created);
2: inited (running) */
static void finalize(void)
{
+ tmgr_trace_free(empty_trace);
+ empty_trace = NULL;
+
xbt_swag_free(command_pending);
xbt_swag_free(command_to_run);
pthread_mutex_destroy(&(context->mutex));
pthread_cond_destroy(&(context->cond));
#endif
+ if(context->exception) free(context->exception);
free(context);
return;
}
for(i=0;i<context->argc; i++)
if(context->argv[i]) free(context->argv[i]);
if(context->argv) free(context->argv);
- if(context->exception) free(context->exception);
if(context->cleanup_func)
context->cleanup_func(context->cleanup_arg);