@Override
    public boolean release(T instance) {
      if (isInPool(instance)) {
        throw new IllegalStateException("Already in the pool!");
      }
      if (mPoolSize < mPool.length) {
        mPool[mPoolSize] = instance;
        mPoolSize++;
        return true;
      }
      return false;
    }
Creates a new instance.

@param maxPoolSize The max pool size.
@throws IllegalArgumentException If the max pool size is less than zero.
systemlib/src/main/java/android/util/Pools.java