Function cell_gc::with_heap
[−]
[src]
pub fn with_heap<R, F>(f: F) -> R where
F: for<'h> FnOnce(&mut HeapSession<'h>) -> R,
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?)