Trait cbox::DisposeRef [] [src]

pub trait DisposeRef {
    type RefTo;
    unsafe fn dispose(ptr: *mut Self::RefTo) { ... }
}

Implemented by any type of which its reference represents a C pointer that can be disposed.

Associated Types

type RefTo

What a reference to this type represents as a C pointer.

Provided Methods

unsafe fn dispose(ptr: *mut Self::RefTo)

Destroy the contents at the pointer's location.

This should run some variant of libc::free(ptr)

Implementors