Reclaiming memory from Nodes

I was actually going to suggest that, but didn't want to sound like a preachy javascript nut. I find classes to be a nice way to structure and organize my code. The benefit of adding methods to the class is that they get added to the object's prototype, which is supposed to save memory if you have many instances. Also, I heavily utilize class(static) properties to share info between instances if needed.

Also, when debugging memory issues in the past, I took advantage of the garbage collection feature of nodejs by passing --expose-gc which enables you to directly run garbage collection. I had an issue when passing buffers between nodejs js and c++ code and it seemed like my memory was climbing and not being collected in a very timely manner. Running the garbage collection at an interval proved to me that my code was clean because the memory was released. javascript - How to request the Garbage Collector in node.js to run? - Stack Overflow