ANTS Memory Profiler - 7.1

ANTS Memory Profiler

Understanding ANTS Memory Profiler

If you have a leak in managed memory, it is likely that you are leaking more than one object:

  • Your object, which is kept in memory because of this leak.
  • Objects in classes from the CLR itself, which are referenced by your object.

If your leaked object contains text, for example, at least one System.String object will also be kept in memory. Your object may only be a few bytes large, but it may be holding a significant amount of memory in classes from the CLR.

Conversely, this means that when you are looking for leaked objects in your code using ANTS Memory Profiler, it is often useful to start by looking at these classes inherited from the CLR, rather than starting from your own classes.

Remember also that no program can decide whether or not an object is a leak, because it depends on the nature of the program you are profiling. If a large number of strings are kept in memory for a long time in word processing software, this may not be an indicator of a problem. However, if strings from a dialog box that has been closed are kept in memory in a graphics program, this could be a good place to start the investigation. Ultimately, therefore, you will need to use knowledge of your code to interpret the information shown in ANTS Memory Profiler.

Was this article helpful?

Search support
Forums

ANTS Memory Profiler

all products