Restrict the display using filters

This tutorial assumes that you have read the tutorial on collecting memory leaks and that you have built the sample application. If you have no done this, please do do before continuing with this tutorial. The memory leak tutorial is here.


This tutorial demonstrates how to restrict the display to show data from only a specific DLL, by using a filter to control the data on the display.

    • Start your program using Memory Validator’s launch program option.Memory Validator launch toolbarThe launch application wizard displayed.Memory Validator launch wizard

      Select [installdir]\nativeExample\debugNonLink\nativeExample.exe using the Browse… button. Accept all default settings and move through all pages of the wizard to the last page. Click the Start Application button.


    • Use nativeExample.exe as normal.
    • Load the dependent DLLs from the DLL menu, option Load dependent DLLs. This menu option causes the example application to load a DLL A that is dependent on DLL B that is dependent on DLL C. The act of loading DLL A causes DLL B and DLL C to load. Each DLL allocates an object defined in a different DLL.Context menu, Load dependent DLLs
    • Using Memory Validator, select the Memory tab and click Refresh. The display will show all allocations made by the application that have not been deallocated. The display will look similar to this:Memory Validator results selected by watermarks
    • Click on an entry with the right mouse button. A context menu will appear. Using the Local Filters popup select Custom Filter…Memory Validator Context menu custom filterThe custom filter dialog will be displayed.Memory Validator custom filter dialog
    • Select the Match Using DLL radio box.
      Select the Match As Any Trace radio box.
      Using the combo box, select the dlldependentonb.dll entry.
      Check the Invert Filter check box at the bottom of the dialog. This option makes the filter display matches rather than hide matches.
      The custom filter dialog should look similar to this image below:Click OK to accept the filter definition. The Memory tab display automatically updates.

      Memory Validator DLL filter results

    • As you can see, the display has been restricted to showing the data that has dlldependentonb.dll in the callstack for the data allocation location. You can create as many filters as you desire.
    • Local filters affect data displayed on their display tab.
    • Session filters affect data displayed for a particular session.
    • Global filters affect data in all sessions on all displays.

When your test application exits, all memory statuses are updated the display is updated. The picture below shows the example application data after the example application has exited.

Memory Validator DLL filter leaked results

Fully functional, free for 30 days