Struct cell_gc::Heap
[−]
[src]
pub struct Heap<'h> { /* fields omitted */ }
Methods
impl<'h> Heap<'h>
[src]
unsafe fn pin<T: IntoHeap<'h>>(&self, p: *mut T::In)
Add the object *p
to the root set, protecting it from GC.
An object that has been pinned n times stays in the root set until it has been unpinned n times.
(Unsafe because if the argument is garbage, a later GC will
crash. Called only from impl GCRef
.)
unsafe fn unpin<T: IntoHeap<'h>>(&self, p: *mut T::In)
Unpin an object (see pin
).
(Unsafe because unpinning an object that other code is still using
causes dangling pointers. Called only from impl GCRef
.)