public boolean noRef() {
        return this.referenceCount.get() == NO_REFERENCE;
    }
to check whether the reference count is 0

@return true if the reference count is 0
src/main/java/com/alipay/remoting/Connection.java