Snapshots are a useful way of identifying memory (or handles) that are loitering in memory for longer than you expected.
These may be leaked, or they may be getting garbage collected later than you expected.
The Snapshots view allows you to create, compare, display and delete snapshots.
Click a part of the image below to jump straight to the help for that area.
The view is split into two halves. The left hand pane manages the creation, comparison, and deletion of snapshots. The right hand pane displays a snapshot or snapshot comparison.
The controls for managing snapshots are listed at the top of the pane.
•Snapshot Create a snapshot. If the snapshot is not automatically named, you will be prompted to name the snapshot
•Compare... Create a snapshot comparison. If the snapshot comparison is not automatically named, you will be prompted to name the snapshot comparison
•Delete Delete the selected snapshot
•Delete All Delete all snapshots
•Display... Edit settings related to the naming of snapshots and snapshot comparisons.
The grid below the controls lists each snapshot or comparison, the garbage collection they are related to and how many objects are represented by the snapshot.
Selecting a snapshot or snapshot comparison in the grid on the left hand pane will display the snapshot or snapshot comparison on the right hand side.
The controls for displaying snapshots are at the top of the right hand pane.
•Snapshot dropdown Choose which group of objects to display
For snapshots there is only one option: Snapshot objects.
For snapshot comparisons there are two options: Snapshot new objects and Snapshot survivors.
oSnapshot objects Shows the objects in the snapshot
oSnapshot new objects Shows the objects in the snapshot comparison that are in the second snapshot but not in the first snapshot.
oSnapshot survivors Shows the objects in the snapshot comparison that are present in the first snapshot and the second snapshot.
•Expand All Expand all callstacks
•Collapse All Collapse all callstacks
•Display... Edit settings related to the displaying snapshots and snapshot comparisons.
The top row of the grid will show the snapshot name (or snapshot comparison name). The row below will indicate what type of objects are present (Objects, New objects, Survivors) and how many.
The remainder of the grid will display callstacks for each object (or group of objects with a common callstack) that are in the group of objects being displayed.
The following popup menu provides options for filtering and examining data in more detail.
The following options are only active for .Net object types. They are disabled for native object types.
•Go to Heap Dump Find the heap dump entries for the selected objects.
•Paths to Root For the selected objects display all the paths from the object to the most recent heap dump roots with the Paths to Root dialog.
•Paths from Root For the selected objects display all the paths most recent heap dump roots to the live objects with the Paths to Root dialog.
Menu option: editing source code
•Edit Source Code... opens the default or preferred editor to edit the source code
Menu options: Collapse Hotspot, Expand Hotspot, Collapse All, Expand All
•Collapse Hotspot or Expand Hotspot simply shows and hides data item information, the same as using the or buttons
•Collapse All or Expand All collapses or expands all callstack entries