Skip to content

Potential Leak #17

Open
Open

Activity

  1. simonexmachina commented on Dec 3, 2015

    @simonexmachina
    Owner

    Nothing. Is there an uninitialize hook I can use to remove it?

  2. stefanpenner commented on Dec 3, 2015

    @stefanpenner
    Author

    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

  3. simonexmachina commented on Dec 3, 2015

    @simonexmachina
    Owner

    Does appInstance fire a destroy event or something?

  4. stefanpenner commented on Dec 3, 2015

    @stefanpenner
    Author

    right now it requires a reopen + willDestroy or destroy override + super to work correctly, which is extremely crappy :sadpanda:

  5. simonexmachina commented on Dec 3, 2015

    @simonexmachina
    Owner

    Okay, I think this is a NOOP. Registering a global is inherently dirty anyway, it's only supported for convenience during development.

  6. stefanpenner commented on Dec 3, 2015

    @stefanpenner
    Author

    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.

  7. simonexmachina commented on Dec 3, 2015

    @simonexmachina
    Owner

    I see. Okay, how can I do the reopen?

  8. stefanpenner commented on Dec 3, 2015

    @stefanpenner
    Author

    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 ?

  9. simonexmachina commented on Dec 3, 2015

    @simonexmachina
    Owner

    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 notifications@github.com 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
    #17 (comment)
    .

  10. robclancy commented on Dec 26, 2017

    @robclancy

    Did he make it back to the office? 😨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions