}
/** @brief Destructor
- * @param l: poor victim
+ * @param g: poor victim
+ * @param node_free_function: function to use to free data associated to each node
+ * @param edge_free_function: function to use to free data associated to each edge
+ * @param graph_free_function: function to use to free data associated to g
*
* Free the graph structure.
*/
xbt_dynar_foreach(g->edges, cursor, edge)
free(edge);
xbt_dynar_free(&(g->edges));
-
+ if(graph_free_function) (*graph_free_function)(g->data);
free(g);
return;