1.0.0 • Published 8 years ago

memorypool v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

MemoryPool

JavaScript Memory Pool implementation

Build Status NPM version Dependency Status devDependency Status

Install

$ npm install memorypool

Usage

const MemoryPool = require('memorypool');
const arrayPool = new MemoryPool(Array);

let numbers = arrayPool.allocate();
let strings = arrayPool.allocate();
arrayPool.free(numbers);
arrayPool.free(strings);

// reuse Array instance from object pool
let bools = arrayPool.allocate();

License

MIT: http://1000ch.mit-license.org