Memory leak detection

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Posts: 1
Joined: Fri Mar 14, 2008 4:34 pm

Memory leak detection

Post by song » Fri Mar 14, 2008 4:40 pm

Hi, I am new to memory profiler.

I am trying the tool to check one of my application to detect any possible memory leaks.

Here are my steps:

run the suspected task once
take a snapshot
run the same task again
take a snapshot

The comparison table with new or removed instances shows delta is 0. all classes have same new and removed instances.

Does it suggest any memory leak?



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

Post by Andreas Suurkuusk » Mon Mar 17, 2008 9:52 am

Having the same number of new and removed instances indicates that some instances have been replaced. Since the number of new and removed instances are the same (and the delta value is 0), there is no indication of a memory leak.

However, you might also want to take a look at the number of bytes used by the classes. A common case of a replaced instance is when a dynamic list has been resized (e.g., by using List<T>). If the new list uses more memory, you might still have a memory leak even though the number of instances is constant.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests