Exemplo n.º 1
0
        void OnDestroy()
        {
            if (null != m_MessageEventHandler)
            {
                m_MessageEventHandler.Dispose();
                m_MessageEventHandler = null;
            }

            Disconnect();

            foreach (ISocketClient socket in m_SocketList)
            {
                socket.Close();
            }

            m_SocketList.Clear();

            if (null != m_oSendRecycle)
            {
                m_oSendRecycle.Release();
                m_oSendRecycle = null;
            }


            if (null != m_oRecieveRecycle)
            {
                m_oRecieveRecycle.Release();
                m_oRecieveRecycle = null;
            }

            if (null != m_oRecieveQueue)
            {
                m_oRecieveQueue.Release();
                m_oRecieveQueue = null;
            }
        }