Channels

Services

Leak Finder helps find memory leaks in JavaScript

Google has open sourced a tool called Leak Finder which is designed to help developers find memory leaks in JavaScript programs. The tool was written by two members of Google's Chrome team in Munich and takes the form of a Python script which takes advantage of Chrome's Remote Inspection Protocol to scan heap snapshots of applications.

In programming languages which use garbage collection, objects that have all their references dropped are removed, freeing memory. In JavaScript, however, the references are sometimes left behind, leading to memory leaks. This often happens when the references point to objects in a JavaScript library, like Closure, as opposed to the actual program code. Leak Finder is designed to find these kinds of memory leaks and the developers provide examples how to use it with Closure.