private void ClearLayers() { if (ChildLayers.Any()) { foreach (Layer child in ChildLayers.ToList()) { // Fixes memory leak on refresh. Remove individual layers so each layer will be teared down properly by GroupLayer. // ChildLayers.Clear() will cause a reset event, which will not contain NewItems/OldItems so they can be unsubscribed ChildLayers.Remove(child); } } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.