X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/18801754584f9ffc3e7c2407008ac24c0eb57926..dc04f83284126c46ca9f5fe5489c31fffd3eb89a:/src/surf/surf_routing.hpp diff --git a/src/surf/surf_routing.hpp b/src/surf/surf_routing.hpp index 7fdd8601ac..600edf1e1e 100644 --- a/src/surf/surf_routing.hpp +++ b/src/surf/surf_routing.hpp @@ -48,15 +48,15 @@ public: */ class As { public: - xbt_dynar_t p_indexNetworkElm; + xbt_dynar_t p_indexNetworkElm = xbt_dynar_new(sizeof(char*),NULL); xbt_dict_t p_bypassRoutes; /* store bypass routes */ routing_model_description_t p_modelDesc; e_surf_routing_hierarchy_t p_hierarchy; - char *p_name; - As *p_routingFather; - xbt_dict_t p_routingSons; + char *p_name = nullptr; + As *p_routingFather = nullptr; + xbt_dict_t p_routingSons = xbt_dict_new_homogeneous(NULL); NetCard *p_netElem; - xbt_dynar_t p_linkUpDownList; + xbt_dynar_t p_linkUpDownList = NULL; /** * @brief The As constructor @@ -67,9 +67,12 @@ public: * @brief The As destructor */ virtual ~As(){ - xbt_free(p_name); - if (p_netElem) - delete p_netElem; + xbt_dict_free(&p_routingSons); + xbt_dynar_free(&p_indexNetworkElm); + xbt_dynar_free(&p_linkUpDownList); + xbt_free(p_name); + if (p_netElem) + delete p_netElem; }; /**