public override void Dispose(bool disposing) { if (SelectedStyle != null) { SelectedStyle.Dispose(); } if (HoveredStyle != null) { HoveredStyle.Dispose(); } base.Dispose(disposing); }
public override void Dispose() { _keepGoing = false; base.Dispose(); SelectedStyle?.Dispose(); SelectedStyle = null; if (_thread != null) { lock (_threadObj) { Monitor.PulseAll(_threadObj); } _thread.Abort(); _thread = null; } }