private void checkRefCount() {

        synchronized (this) {

            if (HydnaDebug.HYDNADEBUG) {
                DebugHelper.debugPrint("Connection",
                                       0,
                                       "RefCount:" + m_channelRefCount);
            }

            if (m_channelRefCount != 0) {
                return;
            }            
        }

        if (HydnaDebug.HYDNADEBUG) {
            DebugHelper.debugPrint("Connection",
                                   0,
                                   "No more refs, destroy connection");
        }

        if (isDestroying() == false) {
            destroy(null);
        }
    }