Context
Prerequisites
1. Have a slow-slow connection: e.g.: on emulator go to Developers options, Network Download Rate Limit, set 128kb.
2. Enable screen rotation.
Actions
- Zoom in to initiate tiles loading;
- Rotate device when tiles are partially loaded;
- Repeat several times.
Result
- Map composable is not drawn at all for a period of time (no background, nothing);
- Heap Dump shows memory leak: several ArcGISMap instances are present (one inside the MapView, and others leak to own StateFlow internally.
It seems like basemap's baseLayers remote loading is not cancelled when MapView is destroyed due to lifecycle. cancelLoad on any item (ArcGISMap, Basemap, Layer) doesn't give any effect.