Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 2ef87f4

Browse files
tiberiuzuldjelbourn
authored andcommitted
fix(panel) memory leak (#11145)
When destroying md-tooltip the callback `onDomAdded` remained attached and was causing a memory leak. Added 4 lines with setting all 4 callbacks to null in `MdPanelRef.prototype.destroy`. Fixes #11133
1 parent 6e46351 commit 2ef87f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/panel/panel.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,6 +1616,10 @@ MdPanelRef.prototype.destroy = function() {
16161616
}
16171617
this.config.scope.$destroy();
16181618
this.config.locals = null;
1619+
this.config.onDomAdded = null;
1620+
this.config.onDomRemoved = null;
1621+
this.config.onRemoving = null;
1622+
this.config.onOpenComplete = null;
16191623
this._interceptors = null;
16201624
};
16211625

0 commit comments

Comments
 (0)