diff -r 6db9c5d7d7ff -r 08adb4f87160 ucx/map.c --- a/ucx/map.c Thu Oct 15 12:46:09 2015 +0200 +++ b/ucx/map.c Thu Oct 15 15:01:50 2015 +0200 @@ -82,6 +82,14 @@ alfree(map->allocator, map); } +void ucx_map_free_content(UcxMap *map, ucx_destructor destr) { + UcxMapIterator iter = ucx_map_iterator(map); + void *val; + UCX_MAP_FOREACH(key, val, iter) { + destr(val); + } +} + void ucx_map_clear(UcxMap *map) { if (map->count == 0) { return; // nothing to do