Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes for cleaning up objects after app exit #11

Open
wants to merge 2 commits into
base: spark
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dist/spark/DevLauncher.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export default class DevLauncher {
this._ui.startApp(this._appType);
}

_stopApp() {
this._ui.destroy();
this._ui = null;
}

_loadInspector() {
if (this._options.useInspector) {
/* Attach the inspector to create a fake DOM that shows where lightning elements can be found. */
Expand Down
6 changes: 5 additions & 1 deletion dist/spark/start.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ sparkview.on('onKeyDown', function(e) {
launcher._handleKey(e);
});

launcher.launch(App, {debug:false, h:sparkscene.h}, {useInspector: false});
sparkscene.on('onClose', function(e) {
launcher._stopApp();
});

launcher.launch(App, {debug:false, h:sparkscene.h}, {useInspector: false});