QuickJS has two functions to increment and decrement a JSValue’s reference count: JS_DupValue and JS_FreeValue respectively.
quickjs-wasm-sys has the latter (quickjs_wasm_sys::__JS_FreeValue) but not the former. This is necessary when working with raw QuickJS values and wanting to prevent them from getting GC’d.
I took a quick look but could not find a quick fix to this.
QuickJS has two functions to increment and decrement a JSValue’s reference count:
JS_DupValue
andJS_FreeValue
respectively.quickjs-wasm-sys
has the latter (quickjs_wasm_sys::__JS_FreeValue
) but not the former. This is necessary when working with raw QuickJS values and wanting to prevent them from getting GC’d.I took a quick look but could not find a quick fix to this.