I have an ArcEngine application, based off an MXD with an axMapControl. Several of the layers in the map are event layers built with XY data in a SQL table. It has routing info applied from a routing table too.
My problem is that when I pan the map, the memory usage grows and grows. The same behavior is exhibited in ArcMap. This inevitably leads the target computer to run at a crawl as memory is depleted, and hard disk swapping all the time.
I'm assuming that the map control is caching the spatial side as new data is drawn on the map.
Is there any way to manage this memory usage? Perhaps flush from time to time, or disable all together? At this stage slower drawing would be preferable as it's simply unworkable in this scenario.
UPDATE: Further investigation suggests that this is always the case, though on low spec (CPU) computers, when panning a lot, the CPU simply can't manage/flush the cache as fast as it grows. On faster machines, you can see the memory climb, but it returns to a lower level pretty quickly too. So this one's simply chalked up to slow CPU's not being able to keep up with all the map control cleverness. It would still be see a good explanation of how this all works behind the scenes.