Hi,
It seems that from some reason from release 14.0.0 onwards using MapView::PanByOffsetAsync() (also RefreshAsync() with same behaviour is observed) causes memory consumption to increase on every call to that method. This can be re-produced with following test code:
private async void mapView_Loaded(object sender, RoutedEventArgs e)
{
// Set the Map's Unit to Meter.
Map = sender as MapView;
Map.MapClick += (sender, args) => MapMouseClick(args);
Map.MapUnit = GeographyUnit.Meter;
// Set the Current Extent to the Max Extent of ThinkGeo Map.
Map.CurrentExtent = MaxExtents.ThinkGeoMaps;
// Add a base map overlay.
var baseOverlay = new ThinkGeoCloudRasterMapsOverlay("AOf22-EmFgIEeK4qkdx5HhwbkBjiRCmIDbIYuP8jWbc~",
"xK0pbuywjaZx4sqauaga8DMlzZprz0qQSjLTow90EhBx5D8gFd2krw~~", ThinkGeoCloudRasterMapsMapType.Light_V1_X1);
// Set up the tile cache for the base overlay, passing in the location and an ID to distinguish the cache.
baseOverlay.TileCache = new FileRasterTileCache(@".\cache", "basemap");
baseOverlay.DrawingExceptionMode = DrawingExceptionMode.DrawException;
// Add the newly created overlay to mapView.
Map.Overlays.Add(baseOverlay);
// Refresh the Map
await Map.RefreshAsync();
}
private async Task MapMouseClick(MapClickMapViewEventArgs args)
{
await Map.PanByOffsetAsync(0d, 0d);
}
Every time map is clicked memory consumption increases. In application where there are many overlayers and layers increase can be hundreds of MB’s on every call. It seems that memory is properly released if you e.g zoom in/out. But without it memory is not released.
Could you please check the reason for this behaviour ? Is there a memory leak somewhere ? With release 13.2.0 and same test code there are no memory issues.
Br, Simo