We are using ThinkGeo Desktop WPF v12.2. Our 32-bit application is experiencing out of memory crashes when zooming (or resizing) a map. I created a topic on the exact same kind of out of memory exception in Mar of 2019 - OutOfMemory exception drawing a line in TrackInteractiveOverlay. The solution for the 2019 issue was to add this line of code, which solved our issue then:
wpfMap1.GCCollectionMode = GCCollectionMode.Forced;
I have noticed that the GCCollectionMode property is no longer available in v12.2. We are still seeing memory spikes when zooming a map (or resizing) that often results in an out of memory exception. Like before, this does not appear to be a memory leak - just a memory spike. Also, the memory spike is directly related to the monitor size and resolution and the size of the map window. For example, a large monitor with a high resolution and a full-screen map window produces a very high memory spike. Whereas, a smaller monitor with a lower resolution and/or a smaller map window produces a lower memory spike.
I have attached a sample application that demonstrates this issue. ThinkGeoPerformance-Tabs.zip (89.7 KB) Select the x86 platform when building the application. Use the following steps to reproduce this issue with the sample application:
- Use a large monitor with a high resolution (e.g., 48" 4K)
- Run the application
- Select the Add Tab button at the top of the application
- Full-screen the application
- Zoom the map in/out
- Use TaskManager to see the high memory spikes