protected override void Dispose(bool isDisposing) { if (null != _plotItems) { _plotItems.CollectionChanged -= EhPlotItemsCollectionChanged; var oldColl = _plotItems; _plotItems = new ObservableList <IGPlotItem>(); // Note: do not wire events here, the sole purpose of this new list is to avoid exceptions foreach (var item in oldColl) { item.Dispose(); } } if (null != _plotGroupStyles) { _plotGroupStyles.Dispose(); _plotGroupStyles = null; } base.Dispose(isDisposing); }