cbstmap · Section 3
cbmap_destroy
NAME
cbmap_destroy - destroy a BST map and set pointer to NULL
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cbstmap.h> cbmap_destroy(cbm);
DESCRIPTION
Frees everything the BST map owns, its nodes, keys and values included, and then sets the map pointer to NULL. This is the name the type-inferred macro layer uses for cbstmap_destroy(3). It behaves the same way.
PARAMETERS
cbm BST map to destroy (the macro sets it to NULL after it destroys
the map)
NOTES
Calling it with a NULL pointer is safe. The macro evaluates cbm exactly once. It must be a modifiable lvalue, such as a variable or an array element, so an expression with a side effect like handles[i++] destroys and clears exactly one element.