1

How to remove detached node of html which is created by combination of jquery and angular. So when there is a route navigation cache is created which is having detached nodes containing angular scopes and html templates which is leading to memory leaks. Is there any way to stop this caching ?

Or clearing entire cache created safely to avoid memory leaks. I am working on big angular SPA app which is having a big leaks which crashes the app after reaching 1000+ MBs.

Sandy
  • 31
  • 1
  • 5
  • please write code what have you tried. – Parth Trivedi Dec 23 '15 at 05:45
  • Have you implemented caching via `$templateCache` ? – Parth Trivedi Dec 23 '15 at 05:49
  • try to remove cache on logout. May be this will help you http://stackoverflow.com/questions/25267962/remove-template-cache-on-logout-angular-js?answertab=active#tab-top – Parth Trivedi Dec 23 '15 at 05:51
  • I am not creating any cache by myself. For test i have 2 html views 2 controllers and used angualar-ui-router. When i keep on changing routes between 2 views i can see 4 leaks one of them is called it in IE. When i opens it it shows cache which is having so many node and some nodes shows $scope, $$childhead, $$childtail and those html views cached as template. This happens when jquery library is loaded when i dont load it it looks fine. I tried clearing that jQuery.cache on route change it worked but giving error on my actual application because it is having nested view navigation of ui-view – Sandy Dec 23 '15 at 13:41

0 Answers0