The compare snapshots feature is used to track memory usage changes in the profiled application. A comparison can be started
in one of the following ways:
- By pressing the Compare Snapshots
() button in the ribbon and then selecting the desired snapshots inside the two
Compare Memory Snapshots
By comparing memory snapshots you can track changes to the live instances by class.
The resulting comparison tab enables you to easily identify what objects have been allocated
and deallocated by the application between the two snapshots.
The comparison tab shows a collapsible summary view and a table.
The summary shows the differences between the two snapshots for:
- Gen 0 Objects count - number of live objects in generation 0 heap.
- Gen 1 Objects count - number of live objects in generation 1 heap.
- Gen 2 Objects count - number of live objects in generation 2 heap.
- LOH Objects count - number of live objects in the large objects heap.
- Total Memory Held - number of bytes allocated for all live instances.
The table shows the differences between the two snapshots for each type allocated. Its columns are:
- Class Name - name of the class.
- Instances (before) - number of live instances in the first snapshot.
- Total Size (before) - number of bytes allocated for the live instances in the first snapshot.
- Instances Diff - the difference between the Instance values of both snapshots.
- Total Size Diff - the difference between the Total size values of both snapshots.
Initially only the types that have changed between the two snapshots are shown. You can view all types by clicking the
Types With No Change toggle button in the ribbon.
Click the Instances button in the ribbon or double-click a type,
and a comparative list of instances of the type from both snapshots is shown in the
Instances Diff view.
The Largest Memory Retainers view in comparison is based on data from the second snapshot only.