Is there a way I can know who holds a reference to an object?
I see that my object is not finalized by the d’tor after I call GC.Collect.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no way to do this effectively in code. The best way to track down leaks of this sort is to use a tool like WinDbg. The SOS extension has several commands which are specifically designed to help track down memory leaks.
Rico did a thorough blog entry on the subject: