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/kernel/resource/DiskImpl.hpp"
11 #include "src/surf/StorageImpl.hpp"
12 #include "src/surf/network_interface.hpp"
17 EngineImpl::~EngineImpl()
19 /* Since hosts_ is a std::map, the hosts are destroyed in the lexicographic order, which ensures that the output is
22 while (not hosts_.empty())
23 hosts_.begin()->second->destroy();
25 /* Also delete the other data */
27 for (auto const& kv : netpoints_)
30 for (auto const& kv : storages_)
32 kv.second->get_impl()->destroy();
34 for (auto const& kv : links_)
36 kv.second->get_impl()->destroy();