ucx/map.c

changeset 208
262c7be94eba
parent 207
1de85ecf6adc
child 209
4f02199d8aae
     1.1 --- a/ucx/map.c	Thu Oct 15 12:39:50 2015 +0200
     1.2 +++ b/ucx/map.c	Thu Oct 15 14:21:38 2015 +0200
     1.3 @@ -82,6 +82,14 @@
     1.4      alfree(map->allocator, map);
     1.5  }
     1.6  
     1.7 +void ucx_map_free_content(UcxMap *map) {
     1.8 +    UcxMapIterator iter = ucx_map_iterator(map);
     1.9 +    void *val;
    1.10 +    UCX_MAP_FOREACH(key, val, iter) {
    1.11 +        free(val);
    1.12 +    }
    1.13 +}
    1.14 +
    1.15  void ucx_map_clear(UcxMap *map) {
    1.16      if (map->count == 0) {
    1.17          return; // nothing to do

mercurial