ember-devtools
ember-devtools copied to clipboard
Potential Leak
what uninstalls this from the global.
https://github.com/aexmachina/ember-devtools/blob/master/app/instance-initializers/ember-devtools.js#L14
Nothing. Is there an uninitialize hook I can use to remove it?
unfortunately not, it would be really nice if initializers had deinitializers. Especially for test run related cleanup. My typical approach is to do the cleanup when the app is destroyed
cc @dgeb
Does appInstance fire a destroy event or something?
right now it requires a reopen + willDestroy or destroy override + super to work correctly, which is extremely crappy :sadpanda:
Okay, I think this is a NOOP. Registering a global is inherently dirty anyway, it's only supported for convenience during development.
Okay, I think this is a NOOP.
This leaks an app during tests, which means it masks other leaks when hunting for leaks.
I believe the reopen is crappy, but fine until we support something better.
I see. Okay, how can I do the reopen?
in the same file as the initializer:
Ember.Application.reopen({
destroy() {
this._super(...arguments);
/* cleanup */
}
})
fugly but should do the trick, deinitialize seems mega important. Maybe a post vacation task for myself, unless i can convince señor @dgeb or @twokul ?
Oh man that's not nice. Okay I'll do it when I get back to the office (with gloves on). I'm gonna put your name on it Stef ;) On Thu, 3 Dec 2015 at 12:36, Stefan Penner [email protected] wrote:
in the same file as the initializer:
Ember.Application.reopen({ destroy() { this._super(...arguments); /* cleanup */ } })
fugly but should do the trick, deinitialize seems mega important. Maybe a post vacation task for myself, unless i can convince señor @dgeb https://github.com/dgeb
— Reply to this email directly or view it on GitHub https://github.com/aexmachina/ember-devtools/issues/17#issuecomment-161488147 .
Did he make it back to the office? :fearful: