Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

who hold reference to these objects

Tags:

windbg

sos

I see that dumpheap -stat command is showing 5 instance of my object. When I run dumpheap -MT , it lists all those 5 instances. In theory there should be only 2 instances. Is there any windbg/sos command to trace who hold the reference to these instances.

like image 512
palm snow Avatar asked Dec 04 '22 22:12

palm snow


1 Answers

You could use !gcroot on the object figure the root.

like image 107
Naveen Avatar answered Mar 16 '23 00:03

Naveen