protected override void OnStop() { if (monitor != null) { Application.PeerCast.RemoveChannelMonitor(monitor); monitor.Dispose(); monitor = null; } base.OnStop(); }