Memory Leakage

Topics: WPF
Jan 16, 2012 at 2:12 PM

Hi,

I am using GMap.Net for WPF.

Each GMapControl instance is taking around 20 MB and is not disposed properly which is causing memory leakage.

1. What is the correct way for disposing a GMapControl?

2. Is it possible to use the same cache for different GMapControls (my application allows to open more than 10 Maps which means 10 instances of a GMapControl)?

Thanks in advance

Coordinator
Jan 16, 2012 at 2:33 PM
  1. map.Dispose(); // but is should be called automatically when you close the form with the map control
  2. each map instance use the same, common cache, but has different threads which uses more memory
Jan 16, 2012 at 2:42 PM
Edited Jan 16, 2012 at 2:43 PM

1. I am using the dlls for WPF i wasn't able to find a dispose method. A WPF window is supposed to dispose all resources on closing while the map is not disposed when its window is closed.

2. Can we reduce memory usage in some way?

Thanks again

Coordinator
Jan 16, 2012 at 2:53 PM

how do you know that map is not disposed?

Coordinator
Jan 16, 2012 at 3:03 PM

i can't see any huge leakage after opening/closing new form with the map control on it: