This gives the host engine control over when allocated memory is freed - right now this means memory is allocated immediately prior to passing items to the wasm module, and then freed when receiving the result.
Closing this for now, as the enumerable stuff (https://github.com/lens-vm/lens/pull/33) will bring free back into the module, most of this code will be brought into that branch.
Relevant issue(s)
Resolves #62
Description
Adds a new
free
function to the wasm interface.This gives the host engine control over when allocated memory is freed - right now this means memory is allocated immediately prior to passing items to the wasm module, and then freed when receiving the result.