mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-20 11:48:30 -06:00
electron-135: fixes as per PR comments to avoid leakages
This commit is contained in:
parent
9dfbdaa1bb
commit
a291846001
@ -347,10 +347,10 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
|
||||
electron.dialog.showMessageBox(options, function (index) {
|
||||
if (index === 0) {
|
||||
mainWindow.reload();
|
||||
browserWin.reload();
|
||||
}
|
||||
else {
|
||||
mainWindow.close();
|
||||
browserWin.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -363,6 +363,12 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
||||
openUrlInDefaultBrowser(childWinUrl);
|
||||
});
|
||||
|
||||
// Clear up the browser window once the window is closed
|
||||
// to avoid leakage
|
||||
browserWin.on('closed', () => {
|
||||
browserWin = null;
|
||||
});
|
||||
|
||||
addWindowKey(newWinKey, browserWin);
|
||||
|
||||
// Method that sends bound changes as soon
|
||||
|
Loading…
Reference in New Issue
Block a user