Hello, I'm working in an app where we have a primary map on the page and a secondary map that is part of a popup. After repeatedly opening and closing the secondary map, eventually the primary map goes blank with an console warning "WebGL context lost".
After some troubleshooting, I learned this was causing by not properly calling the map.destory() and mapView.destroy() methods for garbage collection. However, I noticed that this issue persisted after implementing these methods ONLY if I included the LayerList widget in my maps.
It seems that the LayerList widget is not properly disposing of its layer information and/or webGL contexts to VectorLayers. Our team has a custom layer list implementation that does not encounter this issue.
I wanted to see if the LayerList not properly performing garbage collection is a known issue, or if this is something that needs to be raised to the team.
Thanks for reporting this here @FlockSafety , this is not a know issue. Could you please provide a reproducible test case with a codepen or some other online sandbox?
You also might need to call LayerList.destroy(), it's not specifically mentioned above.
It also might be best to work with tech support on this one so they can assign it an official bug number. https://support.esri.com/en-us/contact