public T allocate(){
  while (true) {
    SoftReference<T> ref;
    ref=_ringQueue.poll();
    if (ref == null) {
      return null;
    }
    T value=ref.get();
    if (value != null) {
      return value;
    }
  }
}

public T allocate ( ) { while ( true ) { SoftReference < T > ref ; ref = _ringQueue . poll ( ) ; if ( ref == null ) { return null ; } T value = ref . get ( ) ; if ( value != null ) { return value ; } } }
try to get an object from the free list . returns null if the free list is empty .
