Member-only story
How To Fix Angular’s Massive Memory Leaks?
Sometimes, a Angular App is developed for a long period of time. The code base grows. Eventually some problems start to occur.
The application becomes slow, uses too much memory and crashes.
In this situation most likely the cause is a memory leak. For small applications, or applications with data layer fixing memory leaks is usually easy.
But sometimes it is not. If there is a lot of places in an app that don’t properly release resources, fixing massive memory leaks can be hard.
Because every of hundreds or thousands of places have to be found and inspected manually.
I have been there multiple times during my career. Sometimes I join legacy projects, that have to undergo heavy refactorings to improve things.
Fixing massive memory leaks is one of such cases. It is worth fixing such memory leaks. Because than application works faster, does not demand so much memory, and does not crash.
During years I have also developed some tools that help me perform massive memory leak fixes in a fraction of time it takes manually.
So, if you have an application that suffers from massive memory leaks, for example caused by not unsubscribing from services, this article is for you.