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

memory leak when destroying an angular-material app #11024

Open
jaa1982 opened this issue Dec 20, 2017 · 3 comments
Open

memory leak when destroying an angular-material app #11024

jaa1982 opened this issue Dec 20, 2017 · 3 comments
Assignees
Labels
needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community P3: important Important issues that really should be fixed when possible. severity: performance This issue causes a significant performance degradation type: performance This issue is related to performance
Milestone

Comments

@jaa1982
Copy link

jaa1982 commented Dec 20, 2017

Actual Behavior:

  • angular-material does not clean-up when angularjs app is destroyed

CodePen (or steps to reproduce the issue): *

  • https://jsfiddle.net/leogdsl/bhkat99u/
  • Details: 3 variations for destroying the app are included in the fiddle, and all show the same behavior. You can quickly modify the fiddle to demonstrate that none have the expected effect

To reproduce, while profiling with dev tools, create and destroy the app multiple times using any of the methods included. Results of tests are all as shown below.

angular-material-memory-leak

AngularJS Versions: *

  • AngularJS Version: 1.5.11
  • AngularJS Material Version: 1.1.5 (latest)

Additional Information:

  • Browser Type: * Chrome, IE
  • Browser Version: * Results shown in Chrome 63
  • OS: * Win10
  • Stack Traces:

Shortcut to create a new CodePen Demo.
Note: * indicates required information. Without this information, your issue may be auto-closed.

Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.

@Splaktar
Copy link
Contributor

What is the use case for destroying and re-creating an AngularJS Material app without a page reload?
Is this related to ngUpgrade?

@Splaktar Splaktar added needs: feedback The issue creator or community need to respond to questions in this issue needs: more info The issue does not contain enough information for the team to determine if it is a real bug labels Dec 27, 2017
@Splaktar
Copy link
Contributor

Splaktar commented Oct 4, 2018

We do have some memory leaks in input and dialog:

But your demo seems to only be using md-button. It injects $mdDialog but doesn't use it.

I've converted the JSFiddle to a CodePen for easier debugging.

@Splaktar Splaktar added this to the 1.1.12 milestone Oct 4, 2018
@Splaktar Splaktar self-assigned this Oct 4, 2018
@Splaktar Splaktar added P3: important Important issues that really should be fixed when possible. needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community labels Oct 4, 2018
@Splaktar
Copy link
Contributor

Splaktar commented Oct 4, 2018

Here's the heaptimeline from my testng in incognito mode:
AngularJS-1.7.4-AngularJS-Material-1.1.10-HEAD.heaptimeline.zip

@Splaktar Splaktar modified the milestones: 1.1.12, 1.1.13 Jan 3, 2019
@Splaktar Splaktar modified the milestones: 1.1.13, 1.1.14 Feb 10, 2019
@Splaktar Splaktar added type: performance This issue is related to performance severity: performance This issue causes a significant performance degradation g3: sync and removed needs: feedback The issue creator or community need to respond to questions in this issue needs: more info The issue does not contain enough information for the team to determine if it is a real bug labels Feb 12, 2019
@Splaktar Splaktar modified the milestones: 1.1.14, g3: sync Feb 15, 2019
@Splaktar Splaktar modified the milestones: g3: sync, 1.1.23, 1.2.1 Apr 30, 2020
@Splaktar Splaktar modified the milestones: 1.2.1, 1.2.2 Sep 14, 2020
@Splaktar Splaktar modified the milestones: 1.2.2, - Backlog Dec 16, 2020
@Splaktar Splaktar removed the g3: sync label Apr 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community P3: important Important issues that really should be fixed when possible. severity: performance This issue causes a significant performance degradation type: performance This issue is related to performance
Projects
None yet
Development

No branches or pull requests

2 participants