Trait zerogc::GcSafe[][src]

pub unsafe trait GcSafe: Trace { }
Expand description

A marker type, indicating that a type can be safely allocated by a garbage collector.

Safety

Custom destructors must never reference garbage collected pointers. The garbage collector may have already freed the other objects before calling this type’s drop function.

Unlike java finalizers, this allows us to deallocate objects normally and avoids a second pass over the objects to check for resurrected objects.

Implementations on Foreign Types

Implementors