X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2930c51f66caea16d89877478c071929bd151c68..00b0567fd44a84090c503f39b3fcf3be7b593f20:/src/s4u/s4u_engine.cpp diff --git a/src/s4u/s4u_engine.cpp b/src/s4u/s4u_engine.cpp index 0906e7d045..0fc822e288 100644 --- a/src/s4u/s4u_engine.cpp +++ b/src/s4u/s4u_engine.cpp @@ -25,6 +25,7 @@ namespace simgrid { namespace s4u { xbt::signal onPlatformCreated; xbt::signal onSimulationEnd; +xbt::signal onTimeAdvance; Engine *Engine::instance_ = nullptr; /* That singleton is awful, but I don't see no other solution right now. */ @@ -101,8 +102,10 @@ static s4u::NetZone* netzoneByNameRecursive(s4u::NetZone* current, const char* n NetZone_t elem; xbt_dict_foreach(current->children(), cursor, key, elem) { simgrid::s4u::NetZone* tmp = netzoneByNameRecursive(elem, name); - if (tmp != nullptr ) - return tmp; + if (tmp != nullptr) { + xbt_dict_cursor_free(&cursor); + return tmp; + } } return nullptr; } @@ -136,7 +139,7 @@ void Engine::netpointRegister(simgrid::kernel::routing::NetPoint* point) /** @brief Unregister a given netpoint */ void Engine::netpointUnregister(simgrid::kernel::routing::NetPoint* point) { - simgrid::simix::kernelImmediate([&] { + simgrid::simix::kernelImmediate([this, point] { pimpl->netpoints_.erase(point->name()); delete point; });