Function mun_runtime::gc::mun_gc_collect [−][src]
#[no_mangle]pub unsafe extern "C" fn mun_gc_collect(
handle: RuntimeHandle,
reclaimed: *mut bool
) -> ErrorHandle
Collects all memory that is no longer referenced by rooted objects. If successful, reclaimed
is set, otherwise a non-zero error handle is returned. If reclaimed
is true
, memory was
reclaimed, otherwise nothing happend. This behavior will likely change in the future.
If a non-zero error handle is returned, it must be manually destructed using
[mun_error_destroy
].
Safety
This function receives raw pointers as parameters. If any of the arguments is a null pointer, an error will be returned. Passing pointers to invalid data, will lead to undefined behavior.