Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "actually fix the memleak around smpi's process_data" and "try to plug a memleak"
[simgrid.git] / src / simix / ActorImpl.cpp
index 63bef05..935ca1b 100644 (file)
@@ -146,9 +146,6 @@ void SIMIX_process_empty_trash()
 
 namespace simgrid {
 
-namespace s4u {
-simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> s4u::Actor::onCreation; // TODO cheinrich is this the right location here?
-}
 namespace simix {
 
 ActorImpl::~ActorImpl()
@@ -351,13 +348,10 @@ smx_actor_t SIMIX_process_create(const char* name, std::function<void()> code, v
   XBT_DEBUG("Inserting %s(%s) in the to_run list", process->getCname(), host->getCname());
   simix_global->process_to_run.push_back(process);
   intrusive_ptr_add_ref(process);
-
   /* Tracing the process creation */
   TRACE_msg_process_create(process->getName(), process->pid, process->host);
-  /* Note by cheinrich: If you move this directly after the "new ActorImpl", the pid
-   * will not yet be set and you will cause issues when other code relies on that.
-   * This is of course also true for the other properties, so I moved this here.
-   */
+
+  /* The onCreation() signal must be delayed until there, where the pid and everything is set */
   simgrid::s4u::ActorPtr tmp = process->iface(); // Passing this directly to onCreation will lead to crashes
   simgrid::s4u::Actor::onCreation(tmp);