cp_hashlist_destroy_custom(3) - Linux man page

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

cp_hashlist(3), cp_hashlist_create(3)