Skip to content

Commit

Permalink
Merge pull request #81090 from SysError99/3.x-fix-js-callback-mem-leak
Browse files Browse the repository at this point in the history
[3.x] Fix JavaScript callback memory leak
  • Loading branch information
akien-mga committed Sep 6, 2023
2 parents 54738d3 + 8ac91f8 commit 1012078
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ const GodotJSWrapper = {
return;
}
const args = Array.from(arguments);
func(p_ref, GodotJSWrapper.get_proxied(args), args.length);
const argsProxy = new GodotJSWrapper.MyProxy(args);
func(p_ref, argsProxy.get_id(), args.length);
argsProxy.unref();
};
id = GodotJSWrapper.get_proxied(cb);
return id;
Expand Down

0 comments on commit 1012078

Please sign in to comment.