cp_hashtable_destroy_shallow(3) - Linux man page
Name
cp_hashtable_destroy, cp_hashtable_destroy_shallow, cp_hashtable_destroy_deep, cp_hashtable_destroy_custom - hashtable destructor functions
Synopsis
#include <cprops/hashtable.h>
void cp_hashtable_destroy(cp_hashtable *table);
void cp_hashtable_destroy_shallow(cp_hashtable *table);
void cp_hashtable_destroy_deep(cp_hashtable *table);
void cp_hashtable_destroy_custom(cp_hashtable *table,
cp_destructor_fn key_destructor, cp_destructor_fn value_destructor);
Description
cp_hashtable_destroy removes all entries from a hashtable, invoking the destructor functions specified for keys and values if not null and if the table mode has the COLLECTION_MODE_DEEP bit set, and finally deallocates internal storage and the cp_hashtable structure itself. Regardless of table mode, cp_hashtable_destroy_shallow never invokes key and item destructor functions, cp_hashtable_destroy_deep always invokes (non-null) key and item destructor functions, and cp_hashtable_destroy_custom always invokes the specified non-null key_destructor and value_destructor functions on keys and values respectively.
See Also
cp_hashtable(3), cp_hashtable_create(3)