Silverlight WinDg Memory Release Issue

Posted by Chris Newton on Stack Overflow See other posts from Stack Overflow or by Chris Newton
Published on 2011-01-12T15:51:17Z Indexed on 2011/01/12 15:53 UTC
Read the original article Hit count: 271

Filed under:
|
|

Hi,

I have used WinDbg succesfully on a number of occasions to track down and fix memory leaks (or more accurately the CLRs inability to garbage collect a released object), but am stuck with one particular control. The control is displayed within a child window and when the window is closed a reference to the control remains and cannot be garbage collected. I have resolved what I believe to be the majority of the issues that could have caused the leak, but the !gcroot of the affected object is not clear (to me at least) as to what is still holding on to this object. The ouput is always the same regardless of the content being presented in the child window:

DOMAIN(03FB7238):HANDLE(Pinned):79b12f8:Root: 06704260(System.Object[])-> 05719f00(System.Collections.Generic.Dictionary2[[System.IntPtr, mscorlib],[System.Object, mscorlib]])-> 067c1310(System.Collections.Generic.Dictionary2+Entry[[System.IntPtr, mscorlib],[System.Object, mscorlib]][])-> 064d42b0(System.Windows.Controls.Grid)-> 064d4314(System.Collections.Generic.Dictionary2[[MS.Internal.IManagedPeerBase, System.Windows],[System.Object, mscorlib]])-> 064d4360(System.Collections.Generic.Dictionary2+Entry[[MS.Internal.IManagedPeerBase, System.Windows],[System.Object, mscorlib]][])-> 064d3860(System.Windows.Controls.Border)-> 064d4218(System.Collections.Generic.Dictionary2[[MS.Internal.IManagedPeerBase, System.Windows],[System.Object, mscorlib]])-> 064d4264(System.Collections.Generic.Dictionary2+Entry[[MS.Internal.IManagedPeerBase, System.Windows],[System.Object, mscorlib]][])-> 064d3bfc(System.Windows.Controls.ContentPresenter)-> 064d3d64(System.Collections.Generic.Dictionary2[[MS.Internal.IManagedPeerBase, System.Windows],[System.Object, mscorlib]])-> 064d3db0(System.Collections.Generic.Dictionary2+Entry[[MS.Internal.IManagedPeerBase, System.Windows],[System.Object, mscorlib]][])-> 064d3dec(System.Collections.Generic.Dictionary2[[System.UInt32, mscorlib],[System.Windows.DependencyObject, System.Windows]])-> 064d3e38(System.Collections.Generic.Dictionary2+Entry[[System.UInt32, mscorlib],[System.Windows.DependencyObject, System.Windows]][])-> 06490b04(Insurer.Analytics.SharedResources.Controls.HistoricalKPIViewerControl)

If anyone has any ideas about what could potentially be the problem, or if you require more information, please let me know.

Kind Regards, Chris

© Stack Overflow or respective owner

Related posts about debugging

Related posts about silverlight-4.0