pub unsafe extern "C" fn nix_gc_register_finalizer(
obj: *mut c_void,
cd: *mut c_void,
finalizer: Option<unsafe extern "C" fn(obj: *mut c_void, cd: *mut c_void)>,
)Expand description
Register a callback that gets called when the object is garbage collected.
Note Objects can only have a single finalizer. This function overwrites existing values silently.
ยงArguments
obj[in] - the object to watchcd[in] - the data to pass to the finalizerfinalizer[in] - the callback function, called with obj and cd