Skip to content

Commit 63291cd

Browse files
committed
fixed memory leak involving cffi handles
1 parent 1be5664 commit 63291cd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

quickjs/quickjs.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def convert_pyvalue_to_jsvalue(_ctx: _JSContext_P, val: Any) -> _JSValue:
293293
else:
294294
raise ValueError(f'Unsupported Python value {type(val)}')
295295

296-
_c_temp.add(_val) # ???
296+
# _c_temp.add(_val) # ???
297297
return _val
298298

299299

@@ -317,8 +317,7 @@ def _quikcjs_cffi_py_func_wrap(_ctx: _JSContext_P, _this_val: _JSValueConst, _ar
317317
ret = py_func(*pyargs)
318318
_ret = convert_pyvalue_to_jsvalue(_ctx, ret)
319319

320-
# _c_temp.discard(_val_p)
321-
# print(f'{_c_temp = }')
320+
_c_temp.discard(_val_p)
322321
return _ret
323322

324323

0 commit comments

Comments
 (0)