Skip to main content

Free

Trait Free 

pub trait Free {
    // Required method
    unsafe fn free(&mut self);
}
Expand description

Custom code to free a handle.

This is similar to the Drop trait, and may be used to implement Drop, but allows handles to be dropped depending on context.

Required Methods§

unsafe fn free(&mut self)

Calls the handle’s free function.

§Safety

The handle must be owned by the caller and safe to free.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§