public void release(){
  while (true) {
    int cnt=activeCnt.get();
    if (cnt == 0) {
      if (log.isDebugEnabled())       log.debug("IPC IO not released (count was 0): " + this);
      return;
    }
    if (activeCnt.compareAndSet(cnt,cnt - 1)) {
      if (cnt == 1) {
        ipcCache.remove(endpointAddr,this);
        if (log.isDebugEnabled())         log.debug("IPC IO stopping as unused: " + this);
        stop();
      }
 else       if (log.isDebugEnabled())       log.debug("IPC IO released: " + this);
      return;
    }
  }
}

public void release ( ) { while ( true ) { int cnt = activeCnt . get ( ) ; if ( cnt == 0 ) { if ( log . isDebugEnabled ( ) ) log . debug ( "IPC IO not released (count was 0): " + this ) ; return ; } if ( activeCnt . compareAndSet ( cnt , cnt - 1 ) ) { if ( cnt == 1 ) { ipcCache . remove ( endpointAddr , this ) ; if ( log . isDebugEnabled ( ) ) log . debug ( "IPC IO stopping as unused: " + this ) ; stop ( ) ; } else if ( log . isDebugEnabled ( ) ) log . debug ( "IPC IO released: " + this ) ; return ; } } }
releases this instance , decrementing usage count . < p > if usage count becomes zero , the instance is stopped and removed from cache .
