Function fungi_lang::shared::clear

source ·
pub fn clear() -> usize
Expand description

Reclaim the space used to serialize large structures. Returns the “copy count” of the table.

We use this “copy count” for regression tests, to ensure that we get the compactness that we expect in these tests.

This clear operation is essential for memory-sensitive programs that dump their structures to external storage: when these serialized structures are no longer needed by the Rust program, their reference count will not drop to zero without first using this operation.