private void clean(){
  Reference ref=fReferenceQueue.poll();
  while (ref != null) {
    Entry entry=((SoftGrammarReference)ref).entry;
    if (entry != null) {
      removeEntry(entry);
    }
    ref=fReferenceQueue.poll();
  }
}

private void clean ( ) { Reference ref = fReferenceQueue . poll ( ) ; while ( ref != null ) { Entry entry = ( ( SoftGrammarReference ) ref ) . entry ; if ( entry != null ) { removeEntry ( entry ) ; } ref = fReferenceQueue . poll ( ) ; } }
removes stale entries from the pool .
