Closed hbakhtiyor closed 11 years ago
Thanks for the PR. As a sidenote: in general we can't accept PR's w/o corresponding tests that (i) test the behaviour (ii) document the problem domain.
Although I certainly understand what you aim to solve, I just wonder whether it's worth it. To make this work we'd need to add conditionals in DefaultMediatorManager to check whether the destroyed
property and finallyDestroy
method exist in the mediator under process. Also, I'm not a big fan of opening up methods through the use of namespaces, although granted, sometimes it just makes sense to use one.
I don't think this will make it into the codebase, but need confirmation from @darscan
And I'm sorry if we deny the PR, it's great you're thinking of ways to improve RL!
I'm not sure if this exact patch is the right solution, but I do like the idea of making mediator teardown more reliable. Thanks for the suggestion, will think about this some more.
I've created a new issue for this.
Finally destroy listeners if child class forget calling destroy super class.
If you like it I will add unit tests and to other patterns.
What do you think?