0

I'm fairly new to browser's memory management, and memory leaks.

I am making a web app using Angular.js which uses web services to get Model.

Plus, all controllers are linked to templates with ngRoutes except one. It is the controller of my app's main menu which also provide additional logic to router. I inject into each controller this MenuController.
One part of my app needs to check often if there are new informations, to make report. I implemented this as a function based on a $timeout which fires himself inside the function.

I have some trouble cause I found out that my app has some memory leaks and makes crash the browser after 5-6 hours of non refresh. I can see it in Chrome and Firefox but I don't know how to solve this issue.
Which steps should I go forward ?
Thanks.

Pierolain
  • 189
  • 1
  • 3
  • 18
  • check this http://stackoverflow.com/a/23303789/301596 and this http://stackoverflow.com/questions/20654684/how-to-catch-memory-leaks-in-an-angular-application – fxck Dec 01 '15 at 17:31

1 Answers1

0

For memory leak in Angular, I would recommend reading this article.

Also check the way you are using ng-repeat (if you do so) in your app… this is a common source of leak when you don't use the 'track by' syntax.

GuilloOme
  • 311
  • 3
  • 9