You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple subscriptions to same media query string should normally unsubscibe.
What is the current behavior?
Multiple subscriptions to same media query string causes memory leak, because only last of them can be GC. Component which wasn't last to subscribe isn't properly gcied and as result, whole component tree is kept in memory with all its data and detached nodes. In my application, this was causing massive memory leaks.
Solutions is not to use scoped variable but rather return queryListener inside addHandler function of fromEventPattern. Then we can this passed reference use inside removeHandler as second parametr and used it to call mql.removeListener.
Activity
crisbeto commentedon Feb 1, 2019
Should be resolved by #14988.
jakubnavratil commentedon Feb 1, 2019
Indeed, very good.
Can be closed now. Thanks
angular-automatic-lock-bot commentedon Sep 10, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.