Is there any way, given an object reference, to understand “Which live objects hold a reference to this object as a field?” (or any other reference for that matter).
Outputting it in a graphical manner can be nice as well.
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.
What you are looking for is a MemoryProfiler.
There are some free and some commercial ones.
I use ANTS Memory Profiler and won’t miss it any more.
You can see what are the connections that are holding objects alive.
Also you can make multiple snapshots and then compare them afterwards, too see what objects are new, how has the count of all objects changed and so on.
Here’s a small walktrhough
see Product Webpage