


Subtract Snapshots
Overview:
Subtracting one snapshot from another snapshot is a useful way to find memory leaks and memory spikes. It can show you everything that was allocated and freed in a time range.
How to Use:
- Take two snapshots and then click on the 'Subtract Snapshots' button (or from the tools menu).
- You will then see a dialog where you can select the two snapshots that you are interested in.
- This will create a new snapshot which will be displayed in the snapshot list view.
- You can then view this snapshot just like any other snapshot.
- Note that the snapshot may contain negative values if some call sites have freed more than they have allocated.

Subtracting using the graph view
There is a quick way to achieve the above using the graph view. Shift-left click at the start of the range you are interested in and drag the mouse to the end of the range. You will see a blue transparent rectangle.
MemPro will automatically take a snapshot at the start and end of this range, and create a new snapshot that is a subtraction of the two snapshots.
These new snapshots will appear in the snapshot list view and you can view them in the normal way.
