private void processQueue ( ) { ComparableSoftReference cr ; while ( ( cr = ( ComparableSoftReference ) gcqueue . poll ( ) ) != null ) { map . remove ( cr . getKey ( ) ) ; } }
Iterate through the gcqueue for for any cleared reference remove the associated value from the underlying set .