C Collections

cbstmap · Section 3

cbstmap_reset

cbstmap_reset - clear all elements from the map

C Collections (libccollections, -lccollections)

#include <ccollections/cbstmap.h>
 
ccol_retval cbstmap_reset(cbmap cbm);

Removes every key-value pair from the map. The map is empty afterwards,
and the caller can keep using it.

cbm  BST map to reset

ccol_success on success.

O(n). All the nodes are destroyed and their keys and values freed. The
function asserts if cbm is NULL.

cbmap_destroy(3), cbstmap_remove_elem(3)