【发布时间】:2011-01-12 15:51:17
【问题描述】:
我曾多次成功地使用 WinDbg 来追踪和修复内存泄漏(或者更准确地说是 CLR 无法对已释放的对象进行垃圾收集),但我被一个特定的控件卡住了。该控件显示在子窗口中,当窗口关闭时,对该控件的引用仍然存在,并且不能被垃圾回收。我已经解决了我认为可能导致泄漏的大多数问题,但是受影响对象的 !gcroot 不清楚(至少对我来说)关于仍然保留该对象的内容。无论子窗口中显示的内容如何,输出始终相同:
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)
如果有人对可能出现的问题有任何想法,或者如果您需要更多信息,请告诉我。
亲切的问候, 克里斯
【问题讨论】:
标签: debugging silverlight-4.0 windbg