Hi all, I'm working on Haskell bindings of wasmtime and got a question about wasm_byte_vec_delete
. It should only free the memory pointed by the data
field, not the wasm_byte_vec_t
struct itself right? Usually when the C API wants to pass a bytestring as a result, it expects the caller to provide space for the wasm_byte_vec_t
, but there are cases where the C API directly return a pointer to wasm_byte_vec_t
(e.g. wasmtime_frame_func_name
). In that case, how do I free the struct's memory? Sounds like a minor source of leak to me, but I hope I'm wrong :)
Never mind, just found in the documentation that the returned names are owned by the frame and shouldn't be deallocated manually
Last updated: Nov 22 2024 at 16:03 UTC