/** * Removes a reference to this object pool. * Clears the pool if it is no longer in use. */ public void release() { assert refCount > 0; if (--refCount == 0) { flush(true); } }
/** * Push all objects out of this pool and into the next (root) pool. */ public void flush() { flush(false); }
public synchronized void release() { try { if (token != null) { token.release(); } if (readerObjectPool != null) { readerObjectPool.flush(); readerObjectPool.release(); } } finally { phase = null; token = null; readerObjectPool = null; } }
writerObjectPool.flush();