public final void decRef() throws IOException {
  if (refCount.get() <= 0) {
    throw new AlreadyClosedException("this IndexReader is closed");
  }
  final int rc=refCount.decrementAndGet();
  if (rc == 0) {
    closed=true;
    Throwable throwable=null;
    try {
      doClose();
    }
 catch (    Throwable th) {
      throwable=th;
    }
 finally {
      try {
        reportCloseToParentReaders();
      }
  finally {
        notifyReaderClosedListeners(throwable);
      }
    }
  }
 else   if (rc < 0) {
    throw new IllegalStateException("too many decRef calls: refCount is " + rc + " after decrement");
  }
}

public final void decRef ( ) throws IOException { if ( refCount . get ( ) <= 0 ) { throw new AlreadyClosedException ( "this IndexReader is closed" ) ; } final int rc = refCount . decrementAndGet ( ) ; if ( rc == 0 ) { closed = true ; Throwable throwable = null ; try { doClose ( ) ; } catch ( Throwable th ) { throwable = th ; } finally { try { reportCloseToParentReaders ( ) ; } finally { notifyReaderClosedListeners ( throwable ) ; } } } else if ( rc < 0 ) { throw new IllegalStateException ( "too many decRef calls: refCount is " + rc + " after decrement" ) ; } }
expert : decreases the refcount of this indexreader instance . if the refcount drops to 0 , then this reader is closed . if an exception is hit , the refcount is unchanged .
