material
material copied to clipboard
memory leak when destroying an angular-material app
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.
AngularJS Versions: *
AngularJS Version:1.5.11AngularJS Material Version:1.1.5 (latest)
Additional Information:
Browser Type: *Chrome, IEBrowser Version: *Results shown in Chrome 63OS: *Win10Stack 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.
What is the use case for destroying and re-creating an AngularJS Material app without a page reload? Is this related to ngUpgrade?
We do have some memory leaks in input and dialog:
- https://github.com/angular/material/issues/10851
- https://github.com/angular/material/issues/11207
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.
Here's the heaptimeline from my testng in incognito mode: AngularJS-1.7.4-AngularJS-Material-1.1.10-HEAD.heaptimeline.zip