/// <summary> /// Remove the data channel from the peer connection and destroy it. /// </summary> public void Dispose() { State = ChannelState.Closing; PeerConnection.RemoveDataChannel(this); State = ChannelState.Closed; GC.SuppressFinalize(this); }
/// <summary> /// Remove the data track from the peer connection and destroy it. /// </summary> public void Dispose() { State = ChannelState.Closing; PeerConnection.RemoveDataChannel(_interopHandle); _interopHandle = IntPtr.Zero; State = ChannelState.Closed; _handle.Free(); GC.SuppressFinalize(this); }