2

My app stack is angular5 and electron2, using also angular material 2.

Trying to solve a memory leak, I notice that each time a material dialog is opened, another detached DOM tree is added. I can't find anything different in my code comparing to other similar projects, which do not have this kind of behaviour.

enter image description here

I'v added take(1) to to every dialog subscription, and in general I have add .unsubscribe() from any subjects to components onDestroy().

edit:

added a gif showing this behaviour

edit:

Follow up on github: https://github.com/angular/components/issues/12114

2
  • Please provide real example where we can see this behavior
    – yurzui
    Commented Jul 8, 2018 at 15:42
  • 1
    added a gif showing this behaviour: it looks like each dialog (and this happens with all dialogs across the app, not just this one) is not garbage collected after its closed, causing more and more detached DOM tree entries. it never happened to me before in other apps, I suspect its related to electron, does it make sense ? thanks
    – Shaniqwa
    Commented Jul 9, 2018 at 7:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.