Disposing wpf GMapControl

Topics: WPF
Mar 4, 2013 at 1:51 PM
Hello again.
My problem is that those 5 TileLoader threads keep hanging in memory even after i close the control. Furtheremore if i reopen the control - i get 10 TileLoader threads. If i close it and open again - its 15. Obvious memory leak.
So i was wondering if there is a method which disposes of GMapControl correctly terminating associated threads. I cant seem to find any.
Cheers.
Mar 4, 2013 at 2:21 PM
how do you 'open'/'close' it?
Mar 5, 2013 at 5:43 AM
By "open" i mean creating a new instance of GMapControl. By "close" i mean unloading this instance from logical tree.
Mar 5, 2013 at 9:18 AM
Disposing is invoked by Dispatcher.ShutdownStarted, you can manually call map.Dispose() to be sure
Mar 5, 2013 at 11:00 AM
Oh. Fore some reason i failed to see the Dispose method -_- Thx.