5 Tips for Fixing a Memory Leak in Angular

John Masterson
Feb 23, 2018 · 2 min read
Image for post
Image for post
Memory Leak

We recently came across a memory leak in our Angular wrapper. In correcting this, we learnt some useful tips along the way. I caught up with Sean Landsman who looks after our integrations with Frameworks and he has the following 5 tips:

Image for post
Image for post
5 Tips

1. Disable all extensions — they don’t cause issues themselves but can muddy the water.

2. Always debug performance and memory leaks in Incognito mode to remove any obfuscation.

Image for post
Image for post
Incognito

3. The Google Docs about using the DevTools are still accurate but some terms and screenshots are out of date. A key point is that what they call “Timeline” now lives under the “Memory” tab.

Image for post
Image for post
Google Documentation | DevTools

4. There are some great resources online, I found this one particularly useful:

5. And finally, in order to help find problematic objects, you can try artificially increase the objects size by creating a large test array within it.

Memory leaks are still tricky but these tips will hopefully help you get to the bottom of yours.

Image for post
Image for post
Learn more about ag-Grid and Angular

The latest update of ag-Grid is out now.

Learn more about Version 18 of ag-Grid.

ag-Grid

We are ag-Grid and our mission is to build the best…

John Masterson

Written by

I’m the COO of ag-Grid where we build the leading datagrid for JavaScript application developers.

ag-Grid

ag-Grid

We are ag-Grid and our mission is to build the best datagrid in the world

John Masterson

Written by

I’m the COO of ag-Grid where we build the leading datagrid for JavaScript application developers.

ag-Grid

ag-Grid

We are ag-Grid and our mission is to build the best datagrid in the world

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store