ThinkGeo.com    |     Documentation    |     Premium Support

Memory consumption with release 14

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

Hi Simo,

Thanks for letting us know. This issue has been fixed in the latest beta 14.3.0-beta050, and we are planning to have a new release 14.2.2 with all this fix. Again, thanks for your demo code which is really helpful.

Thanks,
Ben

Hi,

Yes, it seems to be ok with 14.3.0-beta050.

Is there any estimation when release 14.2.2 would be available ? What do you mean with “with all this fix” so will it also include fix for that GetTokenAsync() throwing exception we discussed earlier ?

Br, Simo

-Simo

That’s right. The fix in this post will also be included. HttpRequestException is thrown without network connection - ThinkGeo UI for Desktop / WPF - ThinkGeo Discussion Forums

Hi,

Ok, thanks. Any estimation for that release ?

Br, Simo

Hi Simo, we’re aiming for the first week of February.