Skip to main content

collect

Function collect 

Source
pub fn collect(roots: &[&Value], env: &Env, heap: &Heap) -> Heap
Expand description

Retain only the cells reachable from roots and env, returning the resulting heap. The next-address counter is preserved so old addresses continue to detect as dangling rather than colliding with newly-allocated cells.