Memory Leakage

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


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

Jan 16, 2012 at 3: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 3:42 PM
Edited Jan 16, 2012 at 3: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

Jan 16, 2012 at 3:53 PM

how do you know that map is not disposed?

Jan 16, 2012 at 4:03 PM

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