message: electron-135: fixes as per PR comments to avoid leakages
diff: @@ -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
  