Skip to main content

object_destroy

Function object_destroy 

Source
pub unsafe fn object_destroy<T>(ptr: *mut T)
Expand description

The body of every {tag}_destroy symbol: release one strong reference. The object is dropped when the last reference goes. Null is a no-op, and a panicking Drop is swallowed because a destructor has no out_err slot and must never unwind into C.

ยงSafety

ptr must be null or a live pointer produced by lower_object whose reference the caller owns and will not use again.