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
fix(material/button): resolve memory leaks in ripples (#28254)
The `MatRippleLoader` that is used in the button doesn't track any ripples, but instead patches the ripples onto the DOM nodes which in theory should avoid leaks since the ripple will be collected together with the node. The problem is that each ripple registers itself with the `RippleEventManager` which needs to be notified on destroy so that it can dereference the DOM nodes and remove the event listeners.
These changes avoid the leaks by:
1. Destroying the ripple when the trigger is destroyed.
2. Cleaning up all the ripples when the ripple loader is destroyed.
3. No longer patching directives onto the DOM nodes.
Fixes#28240.
(cherry picked from commit a962bb7)
0 commit comments