Hash_Table module

table_reset

procedureSource

Removes every entry and frees the slot array through the table's allocator. The table is usable again afterwards and allocates from scratch.

Values and keys that own memory are not freed.

Example↗
table: Table(int, int);
table_add(*table, 1, 1);
table_reset(*table);
assert(table.count == 0 && table.allocated == 0);
table_reset :: (table: *Table)

Parameters

table: *Table

See also