Skip to main content

DropFn

Type Alias DropFn 

Source
pub type DropFn = unsafe fn(payload: *mut u8);
Expand description

drop_value callback shape: release Rust-owned resources held in the payload (e.g. the backing Vec<GcRef> of a Vec[T]). Invoked during sweep (§12.5).

§Safety

payload must point at a value of the descriptor’s type, and afterwards the memory is no longer valid.