Trait comet::internal::finalize_trait::FinalizeTrait [−][src]
pub trait FinalizeTrait<T> {
const NON_TRIVIAL_DTOR: bool;
const CALLBACK: Option<FinalizationCallback>;
extern "C" fn finalize(obj: *mut u8) { ... }
}Expand description
The FinalizeTrait specifies how to finalize objects.
Associated Constants
const NON_TRIVIAL_DTOR: bool
const NON_TRIVIAL_DTOR: bool
If true finalizer is executed at the end of GC cycle for this type.
In most cases compiler should be smart enough to determine if NON_TRIVIAL_DTOR is true
but in some rare unsafe cases you might set it to false by yourself.
const CALLBACK: Option<FinalizationCallback>
const CALLBACK: Option<FinalizationCallback>
Finalization callback executed by GC at the end of GC cycle. It defaults to FinalizeTrait::finalize.