memory-leak in ng-repeat #4026
Description
Hi,
I have found memory leak when using ng-view with ng-repeat in it. I believe it is a bug in angular 1.0.8 and 1.2.0.rc2. Here is a sample code http://plnkr.co/5adwl9kwCyxT5urU9D5x
and without directive http://plnkr.co/edit/eRuNqTaKILjIsTkWUwIn
Bug occures when switching between views:
view1 - view with directive nievents (ng-repeat inside it)
view2 - empty view
After switching between views several times, i can see Detached DOM tree (with 7529 entries) with elements from view1, although i am switched to view2. When you keep switching again and again, copies of Detached DOM trees are created and cause memory leak.
I am not able to determine what causes a memory leak, but I can see ng-repeat scopes are not destroyed (parent scopes from controller are destroyed).
Tested on Chrome 29.0.1547.66 m but FF is also leaking.
I attached screenshot of heap snapshot https://groups.google.com/forum/#!topic/angular/SZzrF1uR4OE