-
Notifications
You must be signed in to change notification settings - Fork 27.4k
SCOPE DESTRUCTION: Leak when asynchronously continuing the linking of directives on scopes that are already destroyed #9199
Comments
did we really need to create a new issue for this? it's basically the same thing as the one you were commenting on is it not? |
@caitp I created the new issue to be sure it is tracked as a leak and not as something that can cause no harm. That said, I am ok with just moving everything to the original issue |
Stop an asynchronous compilation when this is performed on an already destroyed scope Closes angular#9199
Posted an update on #9079 that solves this issue |
I commented on the two commits in #9079. I believe the commit that prevents double destroy events could cause memory leaks and proposed a different solution of actually recursing down the scope hierarchy and calling |
Stop an asynchronous compilation when this is performed on an already destroyed scope Closes angular#9199
Stop an asynchronous compilation when this is performed on an already destroyed scope Closes angular#9199
Stop an asynchronous compilation when this is performed on an already destroyed scope Closes angular#9199
Stop an asynchronous compilation when this is performed on an already destroyed scope Closes angular#9199 Closes angular#9079 Closes angular#8504 Closes angular#9197
When a directive uses a
templateUrl
, this directive is inside anng-switch
or anng-if
and the following events happen in this specific orderng-switch
starts it's compilationng-switch
starts it's compilation, the template is requested from the serverng-switch
changes so the directive should be displayedng-switch-when
(only what it can as the template did not finish loading)ng-switch
changes so the directive should not be displayedelement.data
(here is where we have the leak)Here is a plunker that shows this
http://plnkr.co/edit/tNMYYHgoebX1Vx0hWZAb?p=preview
Note: This issue is based on a modification of #9197
The text was updated successfully, but these errors were encountered: