bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Memory leak using tooltip and ngRepeat

Open landrade opened this issue 12 years ago • 8 comments

When i use the tooltip with ngRepeat and change de provider, for some reason the GC doesn't clean the nodes created by template of tooltip, causing memory leak.

this code simulates the problem: http://codepen.io/anon/pen/KCklA

Developer tool's with tooltip http://imgur.com/mwnIGUs

Developer tool's without tooltip http://imgur.com/zqKav5x

landrade avatar Dec 13 '13 00:12 landrade

@landrade you are using quite old version of the library (0.5.0). The current version is 0.7.0 and it has some fixes for tooltip DOM node leaks. Could you please re-test with 0.7.0 and let me know if it fixes things for you?

pkozlowski-opensource avatar Dec 13 '13 12:12 pkozlowski-opensource

@pkozlowski-opensource i did the migration to 0.7.0 version and it continues leaking. Below is a link to my tests: http://codepen.io/landrade/pen/fnrwv

(at this state the application crashed) screen shot 2013-12-13 at 1 16 09 pm

landrade avatar Dec 13 '13 15:12 landrade

@landrade A fix has landed in master. Please verify that this problem is actually solved via 3fe7aa8cec34f74805fcae2285d8971d3bcdf69a by using http://ci.angularjs.org/job/angularui-bootstrap/ws/dist/ui-bootstrap-tpls-0.8.0-SNAPSHOT.js script.

bekos avatar Dec 14 '13 09:12 bekos

I don't see that the issue is fixed. landrade's test seems to include the lates fixed version http://ci.angularjs.org/job/angularui-bootstrap/ws/dist/ui-bootstrap-tpls-0.8.0-SNAPSHOT.js and still crashes in no time...

see http://codepen.io/landrade/pen/fnrwv

luksch avatar Dec 16 '13 10:12 luksch

That example has unnecessary stuff like bootstrap's js and jquery. Look here: http://codepen.io/anon/pen/HGvFD

bekos avatar Dec 16 '13 10:12 bekos

okay, then i need to extract from my own code an example, because i do face this issue even after the fix. So my problem also might be related to jQuery and stuff. maybe you can hint, why the cluttered example is not fixed by http://ci.angularjs.org/job/angularui-bootstrap/ws/dist/ui-bootstrap-tpls-0.8.0-SNAPSHOT.js

luksch avatar Dec 16 '13 11:12 luksch

There seems to be a problem when jQuery is present! I really can't tell atm what maybe causing it.I will try to have another look when I find time, but I wouldn't be surprised if it is a jQuery bug.

bekos avatar Dec 16 '13 11:12 bekos

thx for pointing that out. You might be right at this. damn! i need jquery and tooltips...

I just tried your example with loading the latest jquery before angular and that results in the memory leak. so at least we know for sure it is connected to jquery.

luksch avatar Dec 16 '13 11:12 luksch