lib/collections/Pool.js
function (obj) {
            var index;
            if (this.__freeObjects.contains(obj)) {
                this.__freeObjects.remove(obj);
            } else if ((index = this.__inUseObjects.indexOf(obj)) > -1) {
                this.__inUseObjects.splice(index, 1);
            }
            //otherwise its not contained in this pool;
            return obj;
        }
function (obj) {
            var index;
            if (this.__freeObjects.contains(obj)) {
                this.__freeObjects.remove(obj);
            } else if ((index = this.__inUseObjects.indexOf(obj)) > -1) {
                this.__inUseObjects.splice(index, 1);
            }
            //otherwise its not contained in this pool;
            return obj;
        }
function ( obj ) { var index ; if ( this . __freeObjects . contains ( obj ) ) { this . __freeObjects . remove ( obj ) ; } else if ( ( index = this . __inUseObjects . indexOf ( obj ) ) > - 1 ) { this . __inUseObjects . splice ( index , 1 ) ; } //otherwise its not contained in this pool; return obj ; }
Removes an object from the pool, this can be overriden to provide any
teardown of objects that needs to take place.

@param {*} obj the object that needs to be removed.

@return {*} the object removed.
Removes an object from the pool this can be overriden to provide any teardown of objects that needs to take place .