Skip to main content

unsafe_pinned_drop_ffi

Macro unsafe_pinned_drop_ffi 

Source
macro_rules! unsafe_pinned_drop_ffi {
    ($type:ty, $ffi_fn:expr) => { ... };
}
Expand description

A helper macro to implement PinnedDrop using a raw FFI destructor.

This generates a PinnedDrop implementation that calls the FFI function with a type-cast pointer of the object.

ยงSafety

The FFI function must take a pointer to the object and correctly clean it up.