question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dialog causes a memory leak when Dialog component contains mat-form-field

See original GitHub issue

What is the expected behavior?

Instantiating a dialog with a component that contains mat-form-field element causes a DOM node memory leak.

What is the current behavior?

Memory leak

What are the steps to reproduce?

https://stackblitz.com/edit/angular-yx1kuw?file=app%2Fdialog-overview-example-dialog.html

Try to open and close the dialog several times. Notice each time the number of detached DOM nodes gets higher and forcing garbage collection doesn’t reduce it.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular Material: 7.3.7 Chrome: 73.0.3683.103

Is there anything else we should know?

Could be related to https://github.com/angular/material2/issues/10188

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
jpduckwocommented, Oct 22, 2019

I believe this could be the root cause issue: angular/angular/issues/25744

1reaction
crisbetocommented, Dec 27, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

material dialog causing memory leak - angular - Stack Overflow
Trying to solve a memory leak, I notice that each time a material dialog is opened, another detached DOM tree is added. I...
Read more >
Angular Tips & Tricks part VIII
Have you created an Angular component that needs an Input defined by ... more and more memory, you are probably dealing with memory...
Read more >
Angular Material 2 Input Leak - StackBlitz
An HTML input, when written to, causes a memory leak (the parent component cant be garbage collect once destroyed)
Read more >
Angular Material Data Table: A Complete Example
A complete example of an Angular Material Data Table with server-side pagination, sorting, filtering, as well as a loading indicator.
Read more >
multiple components match node with tagname mat-form-field
I have an Angular Material application where I have a list of cards, ... causes a memory leak when Dialog component contains mat-form-field#15823....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found