ANTS Memory Profiler - 7.4
Filter by reference
This topic describes the filters that allow you to filter by the references to objects.
For a summary of how to use them, and which filters are most often useful, see Using filters to find objects.
Kept in memory exclusively by
Disposed objects
Event handlers
GC root of type GC root type
Undisposed objects
Add class / interface...
Add namespace...
When you select multiple criteria for this filter, objects are only shown if they are satisfy all of the selected criteria.
Referenced by
The Referenced by filters behave identically to the Kept in memory exclusively by filters, except that objects are shown if at least one of the paths of reference to the GC route goes through the specified type or GC Root. The reference may be direct or indirect.
(With the Kept in memory exclusively by filters, objects are shown if all of the paths of reference to the GC route go through the specified type or GC Root.)
When you select multiple criteria for this filter, objects are only shown if they are satisfy all of the selected criteria.
Never referenced by
The Never referenced by filters have the opposite behavior to the Objects referenced by filters. Objects are shown if none of the paths of reference (including indirect references) to the GC root goes through the specified type of GC Root.
Note that, when viewing the Class List, the number of classes shown when the Never referenced by filter is enabled, plus the number of classes shown when the Referenced by filter is enabled, might add up to more than the total number of classes in the application. This is because some classes might have instances that are referenced by the selected type, while other instances of the same class are never referenced by the selected type.
The Add class/interface filter can be especially useful. Some examples of when you might want to use this filter:
- You know that all the data in your application should be referenced by a single main class. Apply the Never referenced by an instance of class/interface filter to remove objects referenced by the main class from the results.
- Your application performs caching (for example, web applications that cache the query results). Cached objects are deliberately kept in memory for a period of time. Apply the Never referenced by an instance of class/interface filter to exclude objects referenced by a cache class (for example, System.Web.Caching.Cache, for ASP.NET applications).
Relationships between objects
Filters on the Filter by Reference tab enable you to narrow down your search for memory problems by concentrating on certain types of relationships between objects.
Referenced by
Objects may be in memory because another object references them; the object is on at least one of the chains of references between the selected object and a GC root.
Example: objects referenced by Object 1

In this example all objects except Object 2 are referenced by Object 1, either directly or indirectly. Note that the filter selection includes the specified object, Object 1.
Kept in memory exclusively by
Some filters show objects where the selected object is in all chains of references between the objects and a GC root - that is, objects are kept in memory only by the selected object.
Example: objects kept in memory by Object 1 (note that the filter includes the selected object, Object 1)

In this example, only four objects are kept in memory only by Object 1. Object 1 is not in all the chains of references between the remaining objects and their GC roots; for example, Object 4 has another GC root which references it via Object 2. Note that the filter selection includes the specified object, Object 1.
See also |
Was this article helpful?
ANTS Memory Profiler
- Installation error 5100 when installing ANTS Performance Profiler and ANTS Memory Profiler
- Attach to process unavailable with some anti-virus software
- Fragmentation notices in ANTS Memory Profiler 7
- The snapshot failed because .NET did not report every referenced object... manually switch your application to the workstation garbage collector.
- Profiling Sharepoint 2010
- Upgrading to ANTS Memory Profiler 7
- Memory leaks observed when profiling Windows Presentation Framework (WPF) applications
- Windows service profiling fails if the service uses a system account
- Log files
- The type initializer for 'y.layout.hierarchic.ClassicLayerSequencer' threw an exception
- Forcing your application to use .NET 4
- System.EntryPointNotFoundException (Versions: 3,4 only)
- Failed to CoCreate Profiler error profiling a Windows service
- ANTS Profiler code instrumentation method
- Add-in fails to load when using RunAs to start Visual Studio as another user
- Profiling unit tests using Nunit
- Can I profile Compact Framework applications?
- Profiling a SharePoint 2007 Web Part
- Profiling IIS web applications that need to run under the SYSTEM account
- Profiling a web application hosted in IIS on a fixed TCP port
- Profiling client-side XBAP .NET applications
- ANTS Profiler prompts for location of source code which is not your own source code
- ANTS menu remains in Visual Studio after uninstall of ANTS Profiler
- Profiling a web application needing to run as the Network Service account
- Cannot start COM+ application via Remote Desktop
- Profiling BizTalk applications
- Profiling Microsoft Office managed-code add-ins
- The system cannot find the file specified
- Error Stopping IISAdmin profiling IIS web application on Windows XP
- ANTS Memory Profiler total size of all objects does not match the memory footprint of an application
- Creating a global debugging symbols (PDB) directory
- Using the add-in to profile solutions containing more than one project
- Application recycling causes incomplete results and other errors when profiling ASP .NET
- (version 5) Support for profiling Silverlight applications
- Couldn't open metabase error when profiling ASP .NET hosted in IIS
- Failed to coCreate Profiler on ASP .NET web application
- HTTP error 404.17 profiling ASP .NET 1.1 on IIS 7
- Performance counters missing from results
- ANTS Profiler restarts IIS
- Please specify a valid URL message profiling ASP .NET
- Operation could destabilize the runtime error profiling ASP .NET
- IIS ceases to work after profiling web applications
- ANTS Profiler has been split into two distinct programs
- Problems with ANTS Memory Profiler 5 and multiple AppDomains
- System.ArgumentOutOfRangeException or CouldNotMapFileException errors in Memory Profiler 5
- Windows Installer errors 1603 and 2738 occurring during installation
- Unable to coCreate Profiler error profiling any application
- General information about "Private Bytes"
- Profiler stopping while profiling an in-browser Silverlight application
- Error: 'Could not load file or assembly vjslib'
- "No Disk" error occurring while profiling application
- Silverlight out-of-browser profiling stops with no results
- Memory Profiler failing to profile web applications with "unable to connect to server"
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
ANTS Memory Profiler
- Activating your products
- Activating your products
- ANTS Memory Profiler release notes - version 6.xx
- ANTS Memory Profiler release notes - version 7.xx
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs




Understanding memory problems