public void Dispose() { if (m_handshakeLayer != null) { m_handshakeLayer.Dispose(); m_handshakeLayer = null; } if (m_recordLayer != null) { m_recordLayer.Dispose(); m_recordLayer = null; } }
/// <summary> /// Release any contained resources of this SecureChannel object. /// </summary> /// <param name="disposing">set this to true if disposing of managed resources</param> /// <remarks> /// This disposes of the handshake-layer and the record-layer. /// </remarks> protected virtual void Dispose(bool disposing) { if (!disposing) { return; } if (m_handshakeLayer != null) { m_handshakeLayer.Dispose(); m_handshakeLayer = null; } if (m_recordLayer != null) { m_recordLayer.Dispose(); m_recordLayer = null; } }