X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0db7c964785a7e463746904785e2c9b7c7fd7963..a5b9fc207e95994c4db10d5ee1fe6b9036e9d852:/src/kernel/EngineImpl.cpp diff --git a/src/kernel/EngineImpl.cpp b/src/kernel/EngineImpl.cpp index 175a18aa7a..779a7b0f91 100644 --- a/src/kernel/EngineImpl.cpp +++ b/src/kernel/EngineImpl.cpp @@ -1,28 +1,23 @@ -/* Copyright (c) 2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/EngineImpl.hpp" -#include "src/kernel/routing/NetCard.hpp" +#include "simgrid/s4u/Host.hpp" +#include "src/kernel/routing/NetPoint.hpp" #include "src/kernel/routing/NetZoneImpl.hpp" -#include - -xbt_dict_t netcards_dict; namespace simgrid { namespace kernel { -EngineImpl::EngineImpl() -{ - netcards_dict = xbt_dict_new_homogeneous([](void* p) { - delete static_cast(p); - }); -} +EngineImpl::EngineImpl() = default; EngineImpl::~EngineImpl() { + sg_host_exit(); // Hosts should be part of the engine, at some point delete netRoot_; - xbt_dict_free(&netcards_dict); + for (auto const& kv : netpoints_) + delete kv.second; } } }