X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/18801754584f9ffc3e7c2407008ac24c0eb57926..7f2b5ea49487adf6b6d075435936f060617c96ad:/src/surf/surf_routing.hpp diff --git a/src/surf/surf_routing.hpp b/src/surf/surf_routing.hpp index 7fdd8601ac..c3801295dd 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; - NetCard *p_netElem; - xbt_dynar_t p_linkUpDownList; + char *p_name = nullptr; + As *p_routingFather = nullptr; + xbt_dict_t p_routingSons = xbt_dict_new_homogeneous(NULL); + NetCard *p_netcard; + 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_netcard) + delete p_netcard; }; /** @@ -158,7 +161,7 @@ public: * Callbacks * *************/ -XBT_PUBLIC_DATA(simgrid::xbt::signal) routingEdgeCreatedCallbacks; +XBT_PUBLIC_DATA(simgrid::xbt::signal) netcardCreatedCallbacks; XBT_PUBLIC_DATA(simgrid::xbt::signal) asCreatedCallbacks; }