My Node.js app was leaking memory. So I thought to myself; “why, why are you leaking node.js application?”

Needed a way to determine where to seal the hole. Did some google searching, stumbled across Valgrind!

I used something like:

valgrind --leak-check=yes node foo.js

Note: you’re app will run slow, not fast, slow.

Valgrind spit out some stuff, led me to check with their docs to understand the meaning of stuff.

Found that a module was leaking, patched the module. Ran valgrind again. Valgrind spit out some stuff. The stuff was better this time.

Memory leak, fixed. Valgrind rocks.