XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing event system (containers)");
-static container_t rootContainer = nullptr; /* the root container */
-static std::map<std::string, container_t> allContainers; /* all created containers indexed by name */
-
namespace simgrid {
namespace instr {
+static Container* rootContainer = nullptr; /* the root container */
+static std::map<std::string, Container*> allContainers; /* all created containers indexed by name */
+
long long int new_paje_id()
{
static long long int type_id = 0;
// remove me from the allContainers data structure
allContainers.erase(name_);
+ // obligation to dump previous events because they might reference the container that is about to be destroyed
+ last_timestamp_to_dump = SIMIX_get_clock();
+ dump_buffer(true);
+
on_destruction(*this);
}