1
Fork 0

Better memory management

This commit is contained in:
Jake Howard 2015-11-04 19:30:53 +00:00
parent df7952fdcb
commit 3fb6fc5c1e

View file

@ -36,7 +36,7 @@ app.on('ready', function () {
mainWindow.loadUrl('file://' + __dirname + '/index.html');
mainWindow.toggleDevTools();
mainWindow.on('closed', function() {
mainWindow = undefined;
delete mainWindow;
audioController.close();
});
@ -47,14 +47,16 @@ app.on('ready', function () {
frame: false
});
audioController.loadUrl('file://' + __dirname + '/audio.html');
audioController.on('closed', function () { audioController = undefined; });
audioController.on('closed', function () { delete audioController; });
});
ipc.on('hide', function () {
mainWindow.hide();
mainWindow.loadUrl('');
});
ipc.on('show', function () {
mainWindow.loadUrl('file://' + __dirname + '/index.html');
mainWindow.show();
});