Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ignore the lat parameter of peer tag
[simgrid.git] / src / kernel / routing / NetZoneImpl.cpp
index 57619a8..3927a8f 100644 (file)
@@ -32,13 +32,14 @@ NetZoneImpl::NetZoneImpl(NetZone* father, const char* name) : NetZone(father, na
              "Refusing to create a second NetZone called '%s'.", name);
 
   netcard_ = new NetCard(name, NetCard::Type::NetZone, static_cast<NetZoneImpl*>(father));
-  xbt_dict_set(netcards_dict, name, static_cast<void*>(netcard_), nullptr);
   XBT_DEBUG("NetZone '%s' created with the id '%d'", name, netcard_->id());
 }
 NetZoneImpl::~NetZoneImpl()
 {
   for (auto& kv : bypassRoutes_)
     delete kv.second;
+
+  simgrid::s4u::Engine::instance()->netcardUnregister(netcard_);
 }
 
 simgrid::s4u::Host* NetZoneImpl::createHost(const char* name, std::vector<double>* speedPerPstate, int coreAmount)