Fix JavaScript callback memory leak

This commit is contained in:
SysError99 2023-08-29 03:12:53 +07:00 committed by Relintai
parent 4b4e508dab
commit d7575edb2d

View File

@ -205,7 +205,9 @@ const PandemoniumJSWrapper = {
return;
}
const args = Array.from(arguments);
func(p_ref, PandemoniumJSWrapper.get_proxied(args), args.length);
const argsProxy = new PandemoniumJSWrapper.MyProxy(args);
func(p_ref, argsProxy.get_id(), args.length);
argsProxy.unref();
};
id = PandemoniumJSWrapper.get_proxied(cb);
return id;