X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/04f2226028a38d3e30f5d7d30ef53b7274f34cca..0879f7b24ef5f62121c260ef9d22054e10e0e078:/src/s4u/s4u_netzone.cpp diff --git a/src/s4u/s4u_netzone.cpp b/src/s4u/s4u_netzone.cpp index 0a343db706..eda9c3b5c6 100644 --- a/src/s4u/s4u_netzone.cpp +++ b/src/s4u/s4u_netzone.cpp @@ -23,22 +23,17 @@ simgrid::xbt::signal(); } void NetZone::seal() { sealed_ = true; } + NetZone::~NetZone() { - xbt_dict_cursor_t cursor = nullptr; - char* key; - NetZone* elem; - xbt_dict_foreach (children_, cursor, key, elem) { - delete static_cast(elem); - } - - xbt_dict_free(&children_); + delete children_; xbt_free(name_); } std::unordered_map* NetZone::properties() @@ -60,7 +55,7 @@ void NetZone::setProperty(const char* key, const char* value) }); } -xbt_dict_t NetZone::children() +std::vector* NetZone::children() { return children_; }