Hi,
GC "collects" memory when there is no reference in code to it. (Actually not really it is so, yet for simplicity reasons I've written so) Is there a way to get number of actual code references to an object, asuming that I have at least one. I guess GC might know such information, yet I was unable to get to right method. The weakreference isn't the resolution...
Greethings

GC
Moustafa Arafa
Under a native debugger, you can load sos and use the gcroot command.
A programattic approach is a little more difficult. You'll need to use C++ and the CLR profiling API to get this type of information.
riemerg
Thanks very much Scott!
Explanation for Peter: Reference counter can be useful in making (and tuning) own cache mechanizm, and for tracking references that should be nullptr-s yet they aren't, espetially in multithread environment.
Civokcal
Donaghy
Since you asked the question, why do you think you need to know the reference count of an object