Detect memory leaks in #javascript .
Addy Osmani originally shared this post:
Leak Finder: Memory Leak Detection For JavaScript
If you regularly work on JavaScript web apps, you'll know that we're unlikely to run into memory leaks in the traditional sense, but it is possible to have objects that are unintentionally kept alive and in turn keep others alive (like big parts of the DOM).
To help discover these leaks, two of my fellow Googlers (+Marja Hölttä and +Jochen Eisinger) have developed a tool that works with the Chrome Developer Tools (specifically, the remote inspection protocol) and retrieves heap snapshots and detects what objects are causing leaks.
There's more information (and a whole post on how to use the tool) over at http://google-opensource.blogspot.de/2012/08/leak-finder-new-tool-for-javascript.html and I encourage you to check it out. The project page for the leak finder can be found at http://code.google.com/p/leak-finder-for-javascript/.
Some more info: In case you're wondering why a tool like this isn't already integrated with our Developer Tools, the reason is two fold. It was originally developed to help us catch some specific memory scenarios in the Closure Library and it makes more sense as an external tool (or maybe even an extension if we get a heap profiling extension API in place).
Leak Finder: a new tool for JavaScript – Google Open Source Blog
News about Google"s Open Source projects and programs
NASA.gov brings you images, videos and interactive features from the unique perspective of America’s space agency. Get the latest updates on NASA missions, subscribe to blogs, RSS feeds and podcasts,…