I have created a large angular app (Angular 5) with around 80 components and 20-25 services. The app crashes on the machines with lower RAM. There seems to a possibility of memory leak but I am just not been able to identify the same. Following are the steps I have already taken up to optimize the app.
- Unsubscribing the observables when components are destroyed.
- Removing console statements.
- Using ngFor with trackby.
- Using ChangeDetectionStrategy.OnPush in the component definition.
How do I now identify the part from which the memory is not released? Tried using Chrome developer tools to find out the exact cause, but wasn't successful. Is there a better way to determine leaks from Chrome developer tool?
EDIT: Since the application has grown, I am unable to find out the correct way.