diff options
author | SysError99 <syserror99@outlook.com> | 2023-08-29 13:57:44 +0700 |
---|---|---|
committer | SysError99 <syserror99@outlook.com> | 2023-09-07 19:59:45 +0700 |
commit | 6a90164a0319276133a809bd32c366dd5d4c33d4 (patch) | |
tree | 92a9e1cbc8951697427f2f1f032c2392b4c9d416 /platform/web/js | |
parent | 541674d10692cf608f1245d7eede459bdc96b74f (diff) | |
download | redot-engine-6a90164a0319276133a809bd32c366dd5d4c33d4.tar.gz |
Fix JavaScript callback memory leak issue
Typo fix
Diffstat (limited to 'platform/web/js')
-rw-r--r-- | platform/web/js/libs/library_godot_javascript_singleton.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/web/js/libs/library_godot_javascript_singleton.js b/platform/web/js/libs/library_godot_javascript_singleton.js index 1f3633461b..cbe59230ee 100644 --- a/platform/web/js/libs/library_godot_javascript_singleton.js +++ b/platform/web/js/libs/library_godot_javascript_singleton.js @@ -210,7 +210,9 @@ const GodotJSWrapper = { // This is safe! JavaScript is single threaded (and using it in threads is not a good idea anyway). GodotJSWrapper.cb_ret = null; 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; GodotJSWrapper.cb_ret = null; return ret; |