Function coco::epoch::defer_free [] [src]

pub unsafe fn defer_free<T>(object: *mut T, count: usize, pin: &Pin)

Stashes away an object that will later be freed.

The specified object is an array allocated at address object and consists of count elements of type T.

This function inserts the object into a thread-local buffer. When the buffers becomes full, it's objects are flushed into the globally shared Garbage instance.

If the object is unusually large, it is wise to follow up with a call to flush so that it doesn't get stuck waiting in the buffer for a long time.