Skip to main content

__JS_FreeValue

Function __JS_FreeValue 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn __JS_FreeValue( _ctx: *mut JsContext, value: JsValue, )
Expand description

__JS_FreeValue: drop a value whose count just reached zero.

Never called directly by C: the inline JS_FreeValue decrements first and calls this only on the transition to zero. A value that carries no reference count is a no-op, which the inline already filtered out — the check is here too so that a caller which gets it wrong leaks nothing and crashes nothing.

§Safety

value must be a payload from this crate whose count has reached zero, and must not be used again.