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

Commit

Permalink
fix(panel) memory leak (#11145)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tiberiuzuld authored and jelbourn committed Mar 12, 2018
1 parent 6e46351 commit 2ef87f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/panel/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,10 @@ MdPanelRef.prototype.destroy = function() {
}
this.config.scope.$destroy();
this.config.locals = null;
this.config.onDomAdded = null;
this.config.onDomRemoved = null;
this.config.onRemoving = null;
this.config.onOpenComplete = null;
this._interceptors = null;
};

Expand Down

0 comments on commit 2ef87f4

Please sign in to comment.