X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/52089b08b629d77bce06104b92bf99fecaf0349b..be4b540460e5f67714677c3ecf9ff54d2916f0d8:/src/surf/surf_routing.cpp?ds=sidebyside diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index e314b6a37e..6216697e01 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -1263,13 +1263,15 @@ static void finalize_rec(AsPtr as) { /** \brief Frees all memory allocated by the routing module */ void routing_exit(void) { - if (!routing_platf) - return; - xbt_dynar_free(&routing_platf->p_lastRoute); - finalize_rec(routing_platf->p_root); delete routing_platf; } +RoutingPlatf::~RoutingPlatf() +{ + xbt_dynar_free(&p_lastRoute); + finalize_rec(p_root); +} + AS_t surf_AS_get_routing_root() { return routing_platf->p_root; }