The fourth step in profiling the memory usage of your .NET managed program is to locate unneeded objects that are not being garbage-collected.
To find and investigate objects that may be causing memory problems:
1. Open a memory profiling Data Browser window for the snapshot dataset containing the methods you suspect may be causing memory problems. Aggregate runs and diffs do not contain object data.
2. Identify the methods of interest. Purify offers a variety of tools to help you zero in on problem areas:
§ Filtering methods: in the memory profiling Call Graph and Function List View, you can filter out non-critical methods based on class name, method name, or a character string pattern. You can also use the Call Graph's Expand/Collapse and Subtree shortcut menu commands to simplify the Call Graph and focus on related methods.
§ Highlighting methods: in the Call Graph, you can highlight methods based on various criteria, including methods with source code, calling relationships, and areas of heavy memory use.
§ Sorting on method details: in the Function List View, click on any column heading to sort the list on the contents of the column. Right-click in a column heading to show or hide data columns.
3. Identify objects of interest:
§ Using the Function Detail window: in the Call Graph or the Function List View, double-click a method, or select it and click to open the memory profiling Function Detail window. Objects that were allocated by the method are listed in a table below the method's detail data. You can sort the objects in the list by clicking on any column heading.
§ Using the Object List View: in the Object List View tab of the memory profiling Data Browser, click on any column heading to sort the list on various object details. Right-click in a column heading to show or hide data columns.
4. Examine object details. In the Object List View tab of the Data Browser or in the Function Detail window, double-click an object, or select it and click to open the Object Detail window.
Notes:
§ By default, Purify does not collect detailed object data. To collect and view detailed object data, in the PowerCheck tab in the Settings for <exename> dialog box, select Generate Object Reference Graph data, then rerun your program.
§ The Object Detail window is available only if Generate Object Reference Graph data was selected for the run.
§ The Object List view is available only if Generate Object Reference Graph data was selected for the run, and Show Object List View is selected in the Workspace tab of the Preferences dialog box .
§ The Object Detail window does not display for objects whose Root Type is Unreachable.
(C) Copyright IBM Corporation 1992, 2010.