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

tooltip: memory leak on destroy #11133

@pbininda

Description

@pbininda

Bug, feature request, or proposal:

commit #11087 introduced a memory leak in md-tooltip

What is the expected behavior?

no memory leak

What is the current behavior?

memory leak in md-tooltip

CodePen and steps to reproduce the issue:

CodePen Demo which shows your issue:

https://codepen.io/pbininda/pen/vdrZZX

Detailed Reproduction Steps:
Step 1: No memory leaked
  • load the CodePen in Chrome and open chrome dev tools
  • Hit the "TOGGLE BUTTON" 10 times (making the ng-if shown true 5 times)
  • In the dev tools take a memory snapshot and search for "Canary"
  • No living instances of "Canary" are found.
Step 2: Trigger memory leak
  • load the CodePen in Chrome and open chrome dev tools
  • Hit the "TOGGLE BUTTON" 10 times (making the ng-if shown true 5 times)
    • Each time when the "BUTTON WITH TOOLTIP" is shown, hover over the "BUTTON WITH TOOLTIP" to show the "tooltip"
  • In the dev tools take a memory snapshot and search for "Canary"
  • 5 live instances of "Canary" are shown.

What is the use-case or motivation for changing an existing behavior?

We have a big application using angular-material. This memory leak keeps a huge chain of objects alive whenever a user hovers over a button.

Which versions of AngularJS, Material, OS, and browsers are affected?

Material version 1.1.7

Is there anything else we should know? Stack Traces, Screenshots, etc.

Reverting the commit #11087 fixes the problem.

Below is a screenshot of the heap snapshot showing 5 leaked instances of "Canary"

image

Metadata

Metadata

Assignees

Labels

P1: urgentUrgent issues that should be addressed in the next minor or patch release.has: Pull RequestA PR has been created to address this issueresolution: fixedseverity: memory leakIssues where a memory leak is triggered.severity: regressionThis issue is related to a regressiontype: bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions