Silverlight GC Handle

Memory profiling for .NET developers

Moderators: Luke Jefferson, StephenC, AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Silverlight GC Handle

Postby Torinth » Wed Oct 26, 2011 7:33 pm

Hi,

We are using ants memory profiler 7 to find leaks in a silverlight application.

We have identified a few cases where we have growing instance issues (instances continue to grow in numbers and stay around) but they all point back to GC Handle.

Ive done some research and generally this means its being held by native memory. We dont do anything at all with native memory and cant figure out what is causing these items to stick around and grow.

I also cannot hardly find any information on GC Handle and silverlight.

Is there any information that could help us figure out how to fix these issues? Could they be memory leaks in silverlight itself?

Thanks
Torinth
 
Posts: 2
Joined: Wed Oct 26, 2011 7:29 pm

Postby Torinth » Fri Oct 28, 2011 2:52 am

Ive actually found the specific issue i was seeing a leak that was happening when the object holding onto it was a GC Handle

If you use an EventTrigger from System.Interactivity that uses an event that native memory can have access too such as mouse click it can cause a leak.

So if you arent working directly with any native memory objects but native memory is holding onto your objects look to see if there is anything that is listening to things like mouse clicks and keyboard events or anything else that requires native memory to interact with it.
Torinth
 
Posts: 2
Joined: Wed Oct 26, 2011 7:29 pm

Postby Chris.Allen » Fri Oct 28, 2011 10:06 am

Excellent point- thank you.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to ANTS Memory Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests