/// <summary> /// An overrideable version of the Dispose. /// </summary> protected virtual void Dispose(bool disposing) { if (disposing) { // dispose any listeners. if (m_listeners != null) { for (int ii = 0; ii < m_listeners.Count; ii++) { Utils.SilentDispose(m_listeners[ii]); } m_listeners.Clear(); } // dispose any hosts. if (m_hosts != null) { for (int ii = 0; ii < m_hosts.Count; ii++) { Utils.SilentDispose(m_hosts[ii]); } m_hosts.Clear(); } Utils.SilentDispose(m_requestQueue); } }
/// <summary> /// An overrideable version of the Dispose. /// </summary> protected override void Dispose(bool disposing) { if (disposing) { Utils.SilentDispose(m_channel); m_channel = null; Utils.SilentDispose(m_channelFactory); m_channelFactory = null; } base.Dispose(disposing); }