You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the test case, after the callback has been called, the arrow function keep been strongly referenced by the remote module,and cannot be gc collected.
// main process
global.foo = {bar: {
testCallback(cb){
cb && cb('testCallback');
}
}};
// renderer process
let bar = remote.getGlobal('foo').bar;
// create a big array, to make monitor the memory leak easily
let willLeakArray = [];
for (let i = 0; i < 1024 * 1024 * 10; i++) {
willLeakArray.push('' + i);
}
bar.testCallback((value)=> {
console.log('testCallback', value, willLeakArray.length );
})
The text was updated successfully, but these errors were encountered:
The following is the test case.
In the test case, after the
callback
has been called, thearrow function
keep been strongly referenced bythe remote module
,and cannot be gc collected.The text was updated successfully, but these errors were encountered: