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

Commit

Permalink
fix(panel) memory leak
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 committed Mar 3, 2018
1 parent c5ec316 commit f407a3d
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 @@ -1608,6 +1608,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 f407a3d

Please sign in to comment.