X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7b8301c7b24916c15434108eebc479e8e7603ece..65ad88b71f10717fb542633b394035ff2e53e308:/src/simix/smx_host.cpp diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp index 7eaf2bb054..9537df48ea 100644 --- a/src/simix/smx_host.cpp +++ b/src/simix/smx_host.cpp @@ -49,7 +49,9 @@ namespace simgrid { for (auto arg : auto_restart_processes) delete arg; auto_restart_processes.clear(); - xbt_dynar_free(&boot_processes); + for (auto arg : boot_processes) + delete arg; + boot_processes.clear(); xbt_swag_free(process_list); } @@ -59,9 +61,7 @@ namespace simgrid { */ void Host::turnOn() { - unsigned int cpt; - smx_process_arg_t arg; - xbt_dynar_foreach(boot_processes,cpt,arg) { + for (auto arg : boot_processes) { XBT_DEBUG("Booting Process %s(%s) right now", arg->name.c_str(), arg->hostname); simix_global->create_process_function(arg->name.c_str(), arg->code,