Instance and Allocation Filters
The instance and allocation filters are used to present information about instances and allocations that share a common characteristic, e.g. all allocations and instances that are derived from a specific type, all instances that are directly referenced by a root, or all allocations performed by a specific method. Additionally, by combining filters, very specialized information is available, e.g. all instances of a specific type that are directly referenced by a root and allocated by methods in a specific assembly.
Instance and allocation filters are presented below the Types and Resources list on the Overview page. The information presented for each filter is similar to the information presented for a Type. However, depending on the filter, only a subset of the information might be available. For instance, a filter that depends on the state of specific instances (e.g. the Directly rooted instances filter), cannot provide information about allocations per second.
Initially, there is a set of predefined filters included in the filters list. To get more detailed information about the instances and allocations that are included by the filter, you can double-click the filter to bring up the Filter details view. This details view is the same as the Type details view, with the addition that the instances list can include instances of several types. For more information, see Type/Filter/Resource Details Page.
New filters are easily created on-the-fly by using the Show details command that is available in many locations in the snapshot views. For example, clicking Show details on an assembly in the methods view will create a filter that includes information about all allocations performed by that assembly.
A filter can also be created for the instances that are part of an analysis issue by using the Show details link next to the issue title.
Another type of filter is the “derived from” filter. It will include all instances and allocations of types that are derived from a common base type. To define a “derived from” filter, a type needs to be selected in the Type details view. After the type has been selected, the Show derived button can be used to create the filter.
Note
It is possible to enter a Type name in the type name list under the Type details view, even if it is not included among the types in the Overview types list. For instance, a base class that has had no allocations will not be included in the Overview list, but it still possible to use it as a base type for the derived from filter (see screenshots below).