Trait mbox::free::Free[][src]

pub trait Free {
    unsafe fn free(ptr: NonNull<Self>);
}

Implemented for pointers which can be freed.

Required methods

unsafe fn free(ptr: NonNull<Self>)[src]

Drops the content pointed by this pointer and frees it.

Safety

The ptr must be allocated through malloc().

Do not call this method if the pointer has been freed. Users of this trait should maintain a flag to track if the pointer has been freed or not (the Rust compiler will automatically do this with a Drop type).

Loading content...

Implementations on Foreign Types

impl<T> Free for [T][src]

impl Free for str[src]

Loading content...

Implementors

impl<T> Free for T[src]

Loading content...