cbstmap · Section 3
cbstmap_reset
NAME
cbstmap_reset - clear all elements from the map
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cbstmap.h> ccol_retval cbstmap_reset(cbmap cbm);
DESCRIPTION
Removes every key-value pair from the map. The map is empty afterwards, and the caller can keep using it.
PARAMETERS
cbm BST map to reset
RETURN VALUE
ccol_success on success.
NOTES
O(n). All the nodes are destroyed and their keys and values freed. The function asserts if cbm is NULL.