cp_hashtable_destroy(3)
| cp_hashtable(3) | libcprops - cp_hashtable | cp_hashtable(3) |
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
| OCTOBER 2005 | libcprops.0.0.3 |
