Garbage Collection is the process by which the program performs automatic memory management by reclaiming the memory occupied by objects that are not used in the program. Memory leakage is defined as a situation when the memory not needed by the program is not returned to the operating system or pool of free memory. For more details refer Hunting Memory Leakage in JavaScript Application.
git clone repo_name # or clone your own fork
cd repo_name
rm rf .git
npm installnode --inpsect=9229 leakage.js on Chrome Browser open:
chrome://inspectThen, load the snapshot
node snapShot/index.js Output file: heapdump-7369622.877796.heapsnapshot
Load the file using chrome inspector
node --expose-gc --trace-gc expose-gc.js For more command line options refer file command-lines.txt
