Chrome memory leakage polymer elements

While navigating through various sections in the application, a certain amount of memory always leaks out. This is an Angular JS application using polymer elements. I tried to resolve this using various optimization methods in Angular js, but none of them worked.

I even cleared all the functions from my controllers, removed the dependencies of services and factories, cleared the links, but none of them seemed to work. If we go back to the normal HTML elements, I see a rather low memory consumption. Thus, the problem lies somewhere only with polymer elements.

All polymer elements appear in separate dom nodes when heap shots are taken. Is there a way to clear the memory referenced by custom polymer elements? If so, how to do it. Function remove()and creating innerHTMLempty does not work. I also tried to remove the child nodes Polymer.dom(this), but at the same time it had no effect on the same.

Are there any recommendations that should be followed when working with polymer elements regarding memory leaks.

+4
source share

Source: https://habr.com/ru/post/1672907/


All Articles