Clear
Removes all entries, keeping the allocation.
Module: Std::HashMap
Signature
rux
func Clear(self);Description
Empties the map by resetting every slot and setting the count to 0, but keeps the backing buffer so the map can be refilled without reallocating. The capacity is unchanged. To also release the memory, use Free.
Example
rux
import Std::HashMap::*;
map.Clear(); // count is now 0, capacity unchangedSee also
Std::HashMap— the typeFree— also release the memoryRemove— delete a single key