1 /* Copyright (c) 2016-2019. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "src/kernel/EngineImpl.hpp"
7 #include "simgrid/kernel/routing/NetPoint.hpp"
8 #include "simgrid/kernel/routing/NetZoneImpl.hpp"
9 #include "simgrid/s4u/Host.hpp"
10 #include "src/surf/StorageImpl.hpp"
11 #include "src/surf/network_interface.hpp"
16 EngineImpl::~EngineImpl()
18 /* Since hosts_ is a std::map, the hosts are destroyed in the lexicographic order, which ensures that the output is
21 while (not hosts_.empty())
22 hosts_.begin()->second->destroy();
24 /* Also delete the other data */
26 for (auto const& kv : netpoints_)
29 for (auto const& kv : storages_)
31 kv.second->get_impl()->destroy();
33 for (auto const& kv : links_)
35 kv.second->get_impl()->destroy();