wasmtime-c-api: Add wasmtime_store_gc for GCing externrefs

This commit is contained in:
Nick Fitzgerald
2020-07-21 09:33:34 -07:00
parent 96ef2f1a1b
commit 2efb46afd5
2 changed files with 16 additions and 0 deletions

View File

@@ -299,6 +299,17 @@ WASM_API_EXTERN own wasmtime_error_t* wasmtime_wat2wasm(
own wasm_byte_vec_t *ret
);
/**
* \brief Perform garbage collection within the given store.
*
* Garbage collects `externref`s that are used within this store. Any
* `externref`s that are discovered to be unreachable by other code or objects
* will have their finalizers run.
*
* The `store` argument must not be NULL.
*/
WASM_API_EXTERN void wasmtime_store_gc(wasm_store_t* store);
/**
* \typedef wasmtime_linker_t
* \brief Convenience alias for #wasmtime_linker_t