Forcing Garbage Collection with Node.js and V8
I'm in the middle of looking for some memory leaks at the moment, in order to isolate them I wanted to confirm exactly how much memory was being used by a given line of code after garbage collection.
When you run your node script just add the option: '--expose-gc'
node --expose-gc test.js
That's it, good luck finding those leaks!