Sea
An object pool for node.js designed for ease of use and resiliency. Unlike many
object pooling libraries, Sea has a bounded free list size while still
keeping track of the count of outstanding objects. So, if you miss a free()
in your code, the objects will be garbage collected as normal.
Example
var ObjectPool = ; // singleton { thisfoo = null; thisbar = null;} // `clear` is required to be implemented on your typeWidgetprototype { thisfoo = null; thisbar = null;} // `reset` is required to be implemented on your typeWidgetprototype { thisfoo = foo; thisbar = bar;} ObjectPool; { ObjectPool; var w = Widget; w; // do things with w w; ObjectPool;} if requiremain === module ;
License
MIT.