-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Prevent firing callbacks until members are destroyed #366
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Blaze 2.6.1?
I don't know, I tested for our app but I have no comparison or other setups that might break. Maybe we get some more people to test, especially those, having trouble with #213 |
Let's give them some time then. I would like to see it in 2.6.1 if there are no complains. |
@jankapunkt what should be the line for changelog? |
|
That's great @jankapunkt , good detective work. We've never found a way of reproducing #213 so can't really help with tests. We can give it a quick test in staging and if all is order launch it. We'll know after a couple of days if it's worked as it fires pretty much daily. And the removal of a core memory leak like this is also great news 👏🏻 |
From my pov we could do an RC release asap which is great for testing but that's not my call. @fredmaiaarantes what do you think? |
I also think it's worth it. cc @denihs |
I'm going to merge this to the branch release-2.6.1 to centralize everything there. #371 |
Guys, blaze@2.6.1-rc.0 is ready to be tested. #371 |
Awesome! cc @lynchem I hope it will fix your issue as well. For the memory leak I will create a small test project for profiling next week. |
I found a few errors related to #213 (cc @lynchem) when I moved to a new route and a new template is drawn.
I debugged my Templates and found that child templates of the page I "left" were not destroyed, while the page main template was destroyed correctly and the child template was also in
_domrange.members
.So I started a deeper debugging session and found that
Blaze._fireCallbacks(view, 'destroyed')
was placed beforeview._domrange.destroyMembers
and prevented the members from being removed, because the whole method just aborted after_fireCallbacks
was called.Placing it after them removes the members and the errors are gone, while at least our app tests are running fine.
I can't say if this is related to the errors in #213 but I can say that this was definitely a memory leak.
I also don't know where I should place tests for this to prevent future regressions (especially if we do a lot of rewrites for 3.0). Please help whoever can.