156 |
156 |
157 /** |
157 /** |
158 * Frees the contents of a hash map. |
158 * Frees the contents of a hash map. |
159 * |
159 * |
160 * This is a convenience function that iterates over the map and passes all |
160 * This is a convenience function that iterates over the map and passes all |
161 * values to the specified destructor function (e.g. stdlib free()). |
161 * values to the specified destructor function. |
|
162 * |
|
163 * If no destructor is specified (<code>NULL</code>), the free() function of |
|
164 * the map's own allocator is used. |
162 * |
165 * |
163 * You must ensure, that it is valid to pass each value in the map to the same |
166 * You must ensure, that it is valid to pass each value in the map to the same |
164 * destructor function. |
167 * destructor function. |
165 * |
168 * |
166 * You should free or clear the map afterwards, as the contents will be invalid. |
169 * You should free or clear the map afterwards, as the contents will be invalid. |
167 * |
170 * |
168 * @param map for which the contents shall be freed |
171 * @param map for which the contents shall be freed |
169 * @param destr pointer to the destructor function |
172 * @param destr optional pointer to a destructor function |
170 * @see ucx_map_free() |
173 * @see ucx_map_free() |
171 * @see ucx_map_clear() |
174 * @see ucx_map_clear() |
172 */ |
175 */ |
173 void ucx_map_free_content(UcxMap *map, ucx_destructor destr); |
176 void ucx_map_free_content(UcxMap *map, ucx_destructor destr); |
174 |
177 |