From memory perspective, the work of your app is continuous allocation of memory for new objects and releasing the memory left from the objects that are no longer used by the app. Objects are allocated one after another in the so-called managed heap (for details on memory management in .NET, see the .NET Memory Management Concepts section). The instant image of the managed heap is called a memory snapshot. The snapshot contains information about all objects your app has allocated in memory on the moment of clicking the Get Snapshot button.
A timeframe during which you get snapshots (or, in other words, profile your app) is called a profiling session.
In addition to memory allocation data, dotMemory can collect the memory traffic data which shows you how much memory was allocated and released during the session. This info allows you to evaluate how your app performs in dynamics.
Next in this chapter, we will guide you through the main profiling steps:
Controlling profiling: getting memory snapshots, detaching the profiler, and so on.
Note that you can control profiling in two ways: manually (using the control buttons in dotMemory) or automatically (using the API).
Alternatively, you can perform profiling using the dotMemory command-line profiler.