How to find memory leak in Angular Java script
1 answer
From my experience, it is impossible to show you exactly some of the code that can be added to garbage collection. In general, I test a part of my application (view), take a "heap snapshot" and try again to eliminate one test after another, and, as if, find the code with the problem.
Also, if you are using strict mode with lint, this is a good change so you don't have problems.
The above point is for JS in general, for Angular in particular, you know there are some specific issues like observers, $ timeout, $ rootScope, etc.
You can check John Papa's style guide here , it will help you avoid some problems.
0
source to share