User Manual > Instance Details Page

Root path

At the top right, the root paths of the instance are shown. A root path is the path of referees from the selected instance to a root. A root can, for instance, be a static field, a local variable, or a method parameter. If a root cannot be identified, the roots are simply referred to as “<root>.” For an unmanaged resource instance, the “wrapper” instances are used as referees to the instance. If no “wrapper” instances exist, no root paths will be presented.

The root path can be extremely useful for identifying memory leaks. When using the observer pattern or caching instances, it is very easy to forget to remove an observer or to let the cache grow too much. The root path shows why an instance has not been garbage collected.

Every path from the selected instance to every root is presented, and the shortest path is shown first. To select the path to show, use the Root path text box or the up-down control.

The Only include identified roots checkbox can be used to show only root paths that end in an identified root.

The information presented for each referee is the same as in the Referenced by table. At the top of the Root path table is the nearest referee. The farther a referee is from the selected instance, the farther that referee is down the list. At the bottom of the list is the root referee, which is either presented as the name of a static field, a method, or as “<root>.”

NOTE! If all root paths are shown (i.e., Only include identified roots is cleared), then each static root will be presented twice. The Common Language Runtime implements static roots as System.Object arrays, and the memory profiler has no way of identifying this array as an array of static roots. Thus, this array will be presented alongside the static roots.

 

 

.NET Memory Profiler User Manual

© Copyright 2002-2008. SciTech Software AB.

For information about .NET Memory Profiler, see the product site at http://memprofiler.com

.NET Memory Profiler is developed by SciTech Software AB