final public void flush ( ) { blockingLock ( ) ; try { int numSurvivors = sweepAndCollect ( ) ; for ( int i = 0 ; i < numSurvivors ; i ++ ) { final JNIReference ref = mValidReferences [ i ] ; if ( ref != null ) ref . delete ( ) ; } sweepAndCollect ( ) ; // finally, reset the valid references to the minimum mValidReferences = new JNIReference [ mMinimumReferencesToCache ] ; mNextAvailableReferenceSlot = 0 ; mMaxValidReference = mMinimumReferencesToCache ; } finally { blockingUnlock ( ) ; } }
Internal Only .