Function cell_gc::with_heap [] [src]

pub fn with_heap<F, O>(f: F) -> O where
    F: for<'h> FnOnce(&mut Heap<'h>) -> O, 

Create a heap, pass it to a callback, then destroy the heap.

The heap's lifetime is directly tied to this function call, for safety. (So the API is a little wonky --- but how many heaps were you planning on creating?)