debug wpf by using sos.dll issue
I am using sos.dll to find memory leak i开发者_运维技巧n wpf . And I found a wpf object was not released, then I tried to find out why it is not released by using !gcroot
it gave me a warming that:
Please note that 6c369950 is not a valid object.
snippet of the debugging info
!dumpheap -type WPFUILib.MenuWindow
Statistics:
MT Count TotalSize Class Name
0c12ef4c 14 224 WPFUILib.MenuWindow+<>c__DisplayClass2b
03fdf624 2 816 WPFUILib.MenuWindow
Total 16 objects
!gcroot 03fdf624
Note: Roots found on stacks may be false positives. Run "!help gcroot" for
more info.
Please note that 03fdf624 is not a valid object.
You're trying to find the roots for a MethodTable (MT), but !gcroot
expects an object address. If you want to find the roots for your two instances of WPFUILib.MenuWindow
you need to locate their addresses first. Use !dumpheap -mt 03fdf624
to list the addresses and then use !gcroot
on those.
精彩评论