78 |
78 |
79 void ucx_map_free(UcxMap *map) { |
79 void ucx_map_free(UcxMap *map) { |
80 ucx_map_free_elmlist_contents(map); |
80 ucx_map_free_elmlist_contents(map); |
81 alfree(map->allocator, map->map); |
81 alfree(map->allocator, map->map); |
82 alfree(map->allocator, map); |
82 alfree(map->allocator, map); |
|
83 } |
|
84 |
|
85 void ucx_map_free_content(UcxMap *map) { |
|
86 UcxMapIterator iter = ucx_map_iterator(map); |
|
87 void *val; |
|
88 UCX_MAP_FOREACH(key, val, iter) { |
|
89 free(val); |
|
90 } |
83 } |
91 } |
84 |
92 |
85 void ucx_map_clear(UcxMap *map) { |
93 void ucx_map_clear(UcxMap *map) { |
86 if (map->count == 0) { |
94 if (map->count == 0) { |
87 return; // nothing to do |
95 return; // nothing to do |