Reputation: 6014
node comes with abundance of method to create Buffers, but I haven't found one that dealocated the allocated piece of memory.
Do I just set buffer to null when I am done using it and let garbage collection kick in?
var buffer = new Buffer("pls dont null me");
buffer = null;
Upvotes: 7
Views: 3898
Reputation: 623
You should not care about it. When you stop using the variable, the garbage collector will collect. Just in case, its ok if you want to set null.
See the buffer documentation in the Node.js site.
Upvotes: 7