Function mun_function_add_reference

Source
#[no_mangle]
pub unsafe extern "C" fn mun_function_add_reference(
    function: Function,
) -> ErrorHandle
Expand description

Notifies the runtime an additional references exists to the function. This ensures that the data is kept alive even if mun_function_release is called for the existing references. Only after all references have been released can the underlying data be deallocated.

ยงSafety

This function might be unsafe if the underlying data has already been deallocated by a previous call to mun_function_release.