pub fn from_ptr_owned<T>(value: *mut T) -> Box<T>
Expand description

Dereferences a heap pointer and returns a boxed instance. Because the returned value is owned, it will be dropped when it goes out of scope. Useful for deallocating heap values received from accross an ffi boundary. Panics if pointer is null.