You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Fix JavaScript callback memory leak issue
Typo fix
This commit is contained in:
@@ -210,7 +210,9 @@ const GodotJSWrapper = {
|
|||||||
// This is safe! JavaScript is single threaded (and using it in threads is not a good idea anyway).
|
// This is safe! JavaScript is single threaded (and using it in threads is not a good idea anyway).
|
||||||
GodotJSWrapper.cb_ret = null;
|
GodotJSWrapper.cb_ret = null;
|
||||||
const args = Array.from(arguments);
|
const args = Array.from(arguments);
|
||||||
func(p_ref, GodotJSWrapper.get_proxied(args), args.length);
|
const argsProxy = GodotJSWrapper.MyProxy(args);
|
||||||
|
func(p_ref, argsProxy.get_id(), args.length);
|
||||||
|
argsProxy.unref();
|
||||||
const ret = GodotJSWrapper.cb_ret;
|
const ret = GodotJSWrapper.cb_ret;
|
||||||
GodotJSWrapper.cb_ret = null;
|
GodotJSWrapper.cb_ret = null;
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user