Dealing with memory leaks in JavaScript applications can be a complex process. In this article I'm going to show you how to identify whether you have memory leaks, analyse them and ultimately resolve them.
I'm using an AngularJS application to demonstrate the concepts and approaches, but much of this material applies to any JavaScript application.
Contents:
- Understanding Memory Leaks What is a Memory Leak? Why is a Memory Leak Bad?
- Identifying Memory Leaks Method 1: The Wrong Way Method 2: The Timeline Method 3: Recording Heap Allocations Method 4: Heap Snapshots
- Analysing Memory Leaks Analysing the leak in Scenario 2 More on Graphs
- Fixing Memory Leaks Three golden rules Anti-patterns to avoid
- The Future Weak Maps AngularJS 2 Even Better Browsers
- Appendices Thanks Mysteries Futher Reading
Your new post is loading...
Resolving memory leaks can dramatically increase the performance of your application.