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); } } }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.