-
Notifications
You must be signed in to change notification settings - Fork 3k
UI-Router is leaking memory? #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I got slightly different results, look at the screen shot below. At the end, I clicked Collect Garbage (trash bin icon). It almost went back to the initial value. The difference in DOM Nodes is 2 and in Event Listeners is 0. I don't know exactly how GC works in Chrome, but it doesn't remove all unreferenced elements at once. This process is distributed over time and Chrome tries to do this in short periods so the UI freeze is not visible to the end user. |
Yeah I think that is natural (I'm not an expert, but @dreame4 explanation makes perfect sense). Plus I experience zero slow down after clicking at least a hundred times very quickly. A real memory leak would cause a big slow down. |
Could it be that ui-router is leaking memory? To reproduce, start chrome memory inspector, go to this site: http://angular-ui.github.io/ui-router/sample/#/contacts/123 and start clicking like crazy on the "Show random contact" button.
As you can see on the picture, garbage collection does work, however, some DOM elements seem to be still referenced, otherwise the local minimas wouldn't increase?
The text was updated successfully, but these errors were encountered: