- XBT_DEBUG("destroy container %s", container->name);
-
- //obligation to dump previous events because they might
- //reference the container that is about to be destroyed
- TRACE_last_timestamp_to_dump = surf_get_clock();
- TRACE_paje_dump_buffer(1);
-
- //trace my destruction
- if (!TRACE_disable_destroy() && container != PJ_container_get_root()){
- //do not trace the container destruction if user requests
- //or if the container is root
- new_pajeDestroyContainer(container);
- }
-
- //remove it from allContainers data structure
- xbt_dict_remove (allContainers, container->name);
-
- //free
- xbt_free (container->name);
- xbt_free (container->id);
- xbt_dict_free (&container->children);
- xbt_free (container);
- container = nullptr;