public synchronized void clear ( ) { pool . forEachUntil ( new DoUntilProcedure < E > ( ) { public boolean execute ( E object ) { destroyObject ( object ) ; return false ; } } ) ; pool . clear ( ) ; numActive = 0 ; notifyAll ( ) ; // num sleeping has changed }
Clears any objects sitting idle in the pool .