I notice my RAM consumption going up the more I keep my app open. Also, I have 24 other tabs opened at the same time, so I am not really sure whether it my app or some other website. Any clue how to find a leak?
This could be a sign that you may have a lot of active subscriptions which leaks memory.
It is possible that after you a create subscriptions later you might forgot to unsubscribe. This is really important because otherwise subscriptions will still be active and leak memory. One way to do this is when the component is destroyed (implement OnDestroy life cycle interface with onDestroy method (angular.io/guide/lifecycle-hooks) and unsubscribe there). Or check: alligator.io/angular/takeuntil-rxjs-unsubscribe Other solutions is to not to subscribe to Observables but use the async pipe because that will manage the subscription and automatically unsubscribes: angular.io/guide/observables-in-angular
I don't know about any easy way to find those, so go though your code and check if you forgot to unsubscribe from them.
which version of angular are you using. There is an extension called angular batarang for angularJS which will help you to watch the number of watchers created.
jalpesh vadgama
Co-Founder, FutureStack Solution, Full Stack developer having more than 13+ years of experience in web technologies.
There is no direct way to find memory leaks in Angular. But this is the performance checklist I follow mostly to have great application.
github.com/mgechev/angular-performance-checklist