cp_hashlist_destroy(3)
| cp_hashlist(3) | libcprops - cp_hashlist | cp_hashlist(3) |
NAME
cp_hashlist_destroy, cp_hashlist_destroy_by_option, cp_hashlist_destroy_custom - hashlist destructor functions
SYNOPSIS
#include <cprops/hashlist.h>
void cp_hashlist_destroy(cp_hashlist *list);
void cp_hashlist_destroy_deep(cp_hashlist *list);
void cp_hashlist_destroy_custom(cp_hashlist *list,
cp_destructor_fn key_destructor, cp_destructor_fn
value_destructor);
DESCRIPTION
cp_hashlist_destroy iterates over all entries in a hashlist, invoking the destructor functions specified for keys and values if not null and if the list mode has the COLLECTION_MODE_DEEP bit set, and finally deallocates internal storage and the cp_hashlist structure itself. cp_hashlist_destroy_by_option allows specifying a different mode than the list mode to perform finalization and cp_hashlist_destroy_custom allows specifying custom finalization functions for keys (key_destructor) and values(value_destructor).
SEE ALSO
| OCTOBER 2005 | libcprops.0.0.3 |
