- value* val;
- char *value_name;
- xbt_dict_cursor_t cursor = nullptr;
- xbt_dict_foreach (type->values, cursor, value_name, val) {
- XBT_DEBUG("free value %s, child of %s", val->name, val->father->name);
- xbt_free(val);
- }
- xbt_dict_free (&type->values);
- xbt_free (type->name);
- xbt_free (type->id);
- xbt_free (type->color);
- xbt_dict_free (&type->children);
- xbt_free (type);
- type = nullptr;
-}
-
-void recursiveDestroyType (type_t type)
-{
- XBT_DEBUG("recursiveDestroyType %s", type->name);
- xbt_dict_cursor_t cursor = nullptr;
- type_t child;
- char *child_name;
- xbt_dict_foreach(type->children, cursor, child_name, child) {
- recursiveDestroyType (child);
- }
- PJ_type_free(type);