Finding the underlying class for string

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Sim

Finding the underlying class for string

Post by Sim » Mon May 23, 2011 3:05 am

I am looking for memory that is not released in our application.
When I compare 2 snapshots, the class with the highest delta is System.String.

How do I find out the underlying class that are using these strings?

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Re: Finding the underlying class for string

Post by Andreas Suurkuusk » Mon May 23, 2011 10:50 pm

The root paths of the string will provide information about who's using the strings. If you double-click on the String class in the Types list, the root paths of the strings will be presented in the the Type details (to the right). To get information about new instances created since the comparison snapshot, select "Sort by: New live instances". If you browse to a root path that keeps many string instances alive, you should hopefully be able to identify an instance or a set of instances that are using the strings. Once you have located these instances, you can get further information by double-clicking the item in the root path.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests