Wasmtime, a runtime for WebAssembly, contains memory leaks within its C/C++ API when utilizing bindings for `anyref` or `externref` WebAssembly values. This issue stems from a regression introduced during the development of version 37.0.0, specifically related to a refactoring from `ManuallyRooted<T>` to `OwnedRooted<T>` in Rust. The C and C++ APIs were not fully updated to reflect the new ownership semantics of `OwnedRooted<T>`, leading to memory leaks. Specifically, a typo in the `wasmtime val unroot` function prevented proper unrooting, and host-defined functions returning `wasmtime {externref,anyref} t` values were never unrooted. The C++ API lacked destructors on relevant types, further contributing to the issue. These leaks occur when `anyref` or `externref` are used in the C/C++ API, and the `wasmtime` Rust crate is not affected.