private void RemoveExistingFeatures() { var features = _cache.Features.ToList(); _cache.Clear(); // clear before dispose to prevent possible null disposed exception on render // Disposing previous and storing current in the previous field to prevent dispose during rendering. if (_previousFeatures != null) { DisposeRenderedGeometries(_previousFeatures); } _previousFeatures = features; }
public override void ClearCache() { cache.Clear(); }