Select to view content in your preferred language

Memory leak problem with map.

2397
4
07-09-2010 02:08 AM
MladenPecanac
New Contributor
Hi, after update for silverlight 4 (version 2.0 and version before that, if i remeber 1.2) i have problem that map cant be cleared from memory.
We have silverlight application with multiply pages. And we want to free nonactive page from memory. With winDbg i get what holds my page.
__________________________________________________________________________________
0:030> !gcroot 094e2ac8
Note: Roots found on stacks may be false positives. Run "!help gcroot" for
more info.
Scan Thread 0 OSTHread 19d8
Scan Thread 25 OSTHread 2068
Scan Thread 26 OSTHread 2b74
Scan Thread 27 OSTHread 25d8
DOMAIN(0792BB60):HANDLE(Strong):4781174:Root:  08fd6c1c(System.Windows.Browser.EventCookie)->
  18af4368(System.EventHandler`1[[System.Windows.Browser.HtmlEventArgs, System.Windows.Browser]])->
  189bb434(System.Object[])->
  095252d8(System.EventHandler`1[[System.Windows.Browser.HtmlEventArgs, System.Windows.Browser]])->
  09525284(ESRI.ArcGIS.Client.MouseWheelHelper)->
  095249fc(ESRI.ArcGIS.Client.Map)

DOMAIN(0792BB60):HANDLE(Strong):4781178:Root:  08fd6b70(System.Windows.Browser.EventCookie)->
  18af4328(System.EventHandler`1[[System.Windows.Browser.HtmlEventArgs, System.Windows.Browser]])->
  189bb3a4(System.Object[])->
  09525298(System.EventHandler`1[[System.Windows.Browser.HtmlEventArgs, System.Windows.Browser]])->
  09525284(ESRI.ArcGIS.Client.MouseWheelHelper)->
  095249fc(ESRI.ArcGIS.Client.Map)

DOMAIN(0792BB60):HANDLE(Pinned):47812f8:Root:  09a74260(System.Object[])->
  08a89360(System.Collections.Generic.Dictionary`2[[System.IntPtr, mscorlib],[System.Object, mscorlib]])->
  09c6bdf0(System.Collections.Generic.Dictionary`2+Entry[[System.IntPtr, mscorlib],[System.Object, mscorlib]][])->
  0952b110(System.Windows.Threading.DispatcherTimer)->
  0952b13c(MS.Internal.CoreTypeEventHelper)->
  0952b190(System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[MS.Internal.CoreTypeEventHelper+EventAndDelegate, System.Windows]])->
  0952b1dc(System.Collections.Generic.Dictionary`2+Entry[[System.Int32, mscorlib],[MS.Internal.CoreTypeEventHelper+EventAndDelegate, System.Windows]][])->
  0952b180(MS.Internal.CoreTypeEventHelper+EventAndDelegate)->
  0952b148(System.EventHandler)->
  0952b100(ESRI.ArcGIS.Client.ThrottleTimer)->
  0952b0e0(System.Action)->
  094f7990(ESRI.ArcGIS.Client.Map)

DOMAIN(0792BB60):HANDLE(Pinned):47812fc:Root:  09a73250(System.Object[])->
  08fd69ec(System.Windows.Browser.HtmlWindow)->
  08fd6a08(System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Windows.Browser.EventCookie, System.Windows.Browser]])->
  08fd6bc0(System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Windows.Browser.EventCookie, System.Windows.Browser]][])->
  08fd6c1c(System.Windows.Browser.EventCookie)->
  18af4368(System.EventHandler`1[[System.Windows.Browser.HtmlEventArgs, System.Windows.Browser]])->
  189bb434(System.Object[])->
  095252d8(System.EventHandler`1[[System.Windows.Browser.HtmlEventArgs, System.Windows.Browser]])->
  09525284(ESRI.ArcGIS.Client.MouseWheelHelper)->
  095249fc(ESRI.ArcGIS.Client.Map)
__________________________________________________________________________________
As it it seems to me it is something with attaching mouse wheel event handler to System.Windows.Browser.
Thank you for help.
0 Kudos
4 Replies
dotMorten_esri
Esri Notable Contributor
That's interesting... The browser event is only used in two cases:
1) If you are running on a Mac
2) If you are using FireFox/Chrome/Safari and running the plugin in windowless mode.

Are you in one of these scenarios?

Btw. this hasn't changed since v1.2.
0 Kudos
AaronConnolly
Regular Contributor
Hello Morten,

Have you or anyone else on the Silverlight development team noticed any memory leak issues similar to those described (and confirmed by Tim Heuer) here:

Memory Leak Issues with inline DataTemplates in XAML

Our application uses many, many ControlTemplates, Style resources, some in-line, some not, a few Telerik Controls (which makes heavy use of in-line DataTemplates), and several ESRI Silveright controls. We've noticed that our application steady chews up memory and never returns it to the heap. I'm not blaming anything on ESRI here, mind you, but we've observed and prototyped one of the many scenarios described by users in the link above. How about you guys? Have you seen any serious memory problems yet with Silverlight 4 related / pertaining to DataTemplates / ControlTemplates etc ... ?

If so what's your position on the problem? We're waiting / hoping for a fix from MS soon.

Thanks in advance, for the time and help,
- Aaron
0 Kudos
AaronConnolly
Regular Contributor
Hello Morten,

Have you or anyone else on the Silverlight development team noticed any memory leak issues similar to those described (and confirmed by Tim Heuer) here:

Memory Leak Issues with inline DataTemplates in XAML

Our application uses many, many ControlTemplates, Style resources, some in-line, some not, a few Telerik Controls (which makes heavy use of in-line DataTemplates), and several ESRI Silveright controls. We've noticed that our application steady chews up memory and never returns it to the heap. I'm not blaming anything on ESRI here, mind you, but we've observed and prototyped one of the many scenarios described by users in the link above. How about you guys? Have you seen any serious memory problems yet with Silverlight 4 related / pertaining to DataTemplates / ControlTemplates etc ... ?

If so what's your position on the problem? We're waiting / hoping for a fix from MS soon.

Thanks in advance, for the time and help,
- Aaron


On second thought I'll probably just start a new thread. This one is a little stale.
0 Kudos
MladenPecanac
New Contributor
We are using application in windowless mode.
It is same when I use IE or firefox.
0 Kudos