From: Sin Jeong-hun on
I have an object that allocates a lot of memory. It looks like that
the object is referenced by some other object(s), so that it cannot be
collected. I put a debug output in its destructor, and called
GC.Collect() but the debug output wasn't seen. I'm suspecting a third-
party UI control that this object is used with, but I'm not sure
where.

Is there any way to found out an object is being referenced by which
object(s) at debugging time?
Thanks.
From: Patrice on
Hello,

> Is there any way to found out an object is being referenced by which
> object(s) at debugging time?

Never had time to give this a try myself but see :
http://mtaulty.com/communityserver/blogs/mike_taultys_blog/archive/2004/08/03/4671.aspx
and the "Determining Roots" chapter.

AFAIK the sos.dll can be also loaded in the VS debugger rather than in
WinDbg...

Not sure if VS 2010 does something to better expose this kind of debugging
aids with a nice UI...

--
Patrice