exports.FreeList = function (name, max, constructor){ this.name = name; this.constructor = constructor; this.max = max; this.list = [] ; } ; exports.FreeList.prototype.alloc = function (){ return _AN_Read_length('length', this.list)? this.list.shift(): this.constructor.apply(this, arguments); } ; exports.FreeList.prototype.free = function (obj){ if (_AN_Read_length('length', this.list) < this.max) { this.list.push(obj); } } ;