lib/collections/Pool.js
function (obj) {
            var index;
            if (this.validate(obj) && this.count <= this.__maxObjects && (index = this.__inUseObjects.indexOf(obj)) > -1) {
                this.__freeObjects.enqueue(obj);
                this.__inUseObjects.splice(index, 1);
            } else {
                this.removeObject(obj);
            }
        }
function (obj) {
            var index;
            if (this.validate(obj) && this.count <= this.__maxObjects && (index = this.__inUseObjects.indexOf(obj)) > -1) {
                this.__freeObjects.enqueue(obj);
                this.__inUseObjects.splice(index, 1);
            } else {
                this.removeObject(obj);
            }
        }
function ( obj ) { var index ; if ( this . validate ( obj ) && this . count <= this . __maxObjects && ( index = this . __inUseObjects . indexOf ( obj ) ) > - 1 ) { this . __freeObjects . enqueue ( obj ) ; this . __inUseObjects . splice ( index , 1 ) ; } else { this . removeObject ( obj ) ; } }
Returns an object to this pool. The object is validated before it is returned to the pool,
if the validation fails then it is removed from the pool;
@param {*} obj the object to return to the pool
Returns an object to this pool . The object is validated before it is returned to the pool if the validation fails then it is removed from the pool ;