dotMemory 2018.1 Help

Group by Types

The Group by Types view shows a list of objects in the selected object set. For convenience, all objects are grouped by their type: each row in the list represents a certain type. All objects of that type existing in the set are counted under this row. You can use the Group by Types view to identify objects which consume too much memory or objects that should not be in memory at all.

The list consists of the following columns:

NameDescription
Type Type name.
Objects count The number of objects of the same type.
Bytes The overall shallow size of objects in bytes.
Minimum retained bytes The overall size of all exclusively retained objects in bytes. This is a lower estimate of how many bytes will be freed if you remove all objects of a certain type.

Example

ex class list

Grouping objects in the list

For convenience, you can group the list in four different ways:

  • Plain List
    Objects are displayed in a plain list. This is the easiest way to identify objects with the highest memory usage.
  • Group by Namespace
    Objects are grouped by their namespace. This type of grouping is very convenient when you want to concentrate in determining issues in your own classes.
  • Group by Assembly
    Objects are grouped by the assembly they come from. This type of grouping can also be used to separate your own classes from the system ones.
  • Group by Interface
    Objects are grouped by interfaces they implement. If an object implements more than one interface, it will be displayed under each implemented interface.

Filtering Objects

You can filter out objects that are of no interest for your analysis.

To narrow the list

  • Start typing the desired type name in the Filter field.

    dotMemory will exclude all instances that don't match the pattern.

You can make your search more efficient by using the following tips:

  • Use CamelHumps. E.g. fo will return objects of both System.Drawing.Font and MS.Utility.FrugalObjectList types.
  • Use special symbols, like wildcards and others. The full list is shown in the table below.

Symbol Description Example
* Wildcard *
All objects in the set
sys.*.data
All types and namespaces that match the pattern. E.g. System.Data, System.Windows.Controls.Datagrid, and System.Windows.Data.Binding.
sys.*.data.
Only namespaces that match the pattern. E.g. System.Windows.Data.Binding but not System.Windows.Controls.Datagrid.
Arrays
[] Leave only arrays str[]
Arrays, containing str in their type or namespace. E.g. String[].
[,
[,,
...
or
[,]
[,,]
...
Leave only arrays of the specified or higher (if brackets are not closed) dimension str[,,
Arrays with the dimension 3 and higher containing str in their type or namespace. E.g. String[,,] and String[,,,].
str[,,]
Three-dimensional arrays containing str in their type or namespace. E.g. String[,,].
!a Exclude arrays from the result !a str
Objects (excluding arrays) containing str in their type or namespace. E.g. String but not String[].
Generic type arguments
< Leave only types with generic type arguments str<
Only objects containing str in their type or namespace and having generic type arguments. E.g. FileStreamStorage<Char> but not List<String>.
<str
Only objects containing str in their generic type arguments. E.g. List<String> but not FileStreamStorage<Char>.
<,
<,,
...
or
<,>
<,,>
...
Leave only objects with the specified number of generic type arguments fun<,,>
Objects containing fun in their type or namespace and having three generic type arguments. E.g. Func<String, Object, Object>.
fun<str,,task
Objects containing fun in their type or namespace and having three or generic type arguments that match the pattern. E.g. Func<Stream, IAsyncResult, TaskResult, EventArgs>.
!g Exclude generic type arguments from the search scope !g str
Objects (that do not have generic type arguments) containing str in their type or namespace. E.g. String but not List<String>.

Selecting objects for further analysis

In the Group by Types view, you can select the following subjects for further analysis:

To select objects of a specific type

  • Do one of the following:
    • Double-click the type in the list.
    • Right-click the type and choose Open this object set.

    After this, the selected object set is added to the Analysis Path and you can use other object set views to analyze the objects in more details.

To select the objects that are exclusively retained by the analyzed objects set

  • Click the open retained objects button Open objects retained by this set button.

    After this, the Exclusively retained objects subject will be added to the Analysis Path and the list of desired objects will be displayed in the Group by Types view.

Last modified: 11 May 2018

See Also