Wasmtime
|
Container for different kinds of wasm values. More...
#include <val.h>
Data Fields | |
wasmtime_valkind_t | kind |
Discriminant of which field of of is valid. | |
wasmtime_valunion_t | of |
Container for the extern item's value. | |
Container for different kinds of wasm values.
Note that this structure may contain an owned value, namely rooted GC references, depending on the context in which this is used. APIs which consume a wasmtime_val_t do not take ownership, but APIs that return wasmtime_val_t require that wasmtime_val_unroot is called to clean up any possible GC roots in the value.
If you do not unroot the value, even if you free the corresponding Store, there will be some memory leaked, because GC roots use a separate allocation to track liveness.