Bug: Memory leak on removing app's root element #15239
Description
Probable Bug
Behavior: Memory leak after removing the app (by removing the app's root element)
Bug reproduction: Please check this demo http://codepen.io/djidel/pen/PGREXm
The n is how many times a primitive angular app is bootstrapped then removed.
With n=1 the whole page uses about 30Mb.
With n=500 the page uses about 70Mb.
Removing the app's root element seems to have no effect in memory use.
The expected behavior: Removing angular app's root element should "destroy" the app and clean up all the used memory.
Motivation / use case:
A web app that bootstraps angular apps on independent DOM objects while user interacts. Long use of the web app should not result in high memory use.
Angular version: 1.5.5
Browser: Google Chrome
Browser version: 53
OS: Windows