ANTS Memory Profiler 8

Checking that a memory leak is fixed

This page outlines how to check that a memory leak you previously identified is now fixed:

  1. Repeat the steps you used to find the memory leak. If you are looking for a particular class or object, switch to the Class List, and use the  find box to locate the class or object in which you are interested.
  2. If you have fixed the leak, the objects should not be in memory.

    If an object is unexpectedly still found in memory, there are two main likely causes:

    • The object might be on the finalizer queue. To check, display the object on the instance retention graph, and view objects on the finalizer queue by clearing the Hide finalizer queue GC roots option on the bar above the graph. If your object is on the finalizer queue, take another snapshot and check again: the object may be removed when the garbage collector runs.
    • The object may still be held in memory on a different path. The instance categorizer only shows retention along the shortest path. If your object was being kept in memory on more than one path, you may have to break references on these other paths, too.

Didn't find what you were looking for?