You can use the API exposed by ANTS Memory Profiler to take snapshots from within your code. First, you need to edit your application's code to trigger the snapshot, then run the built application alongside ANTS Memory Profiler.
Take snapshots from your code to ensure that snapshots are taken precisely when you believe that a leak occurs, or if your application does not have an interface through which you can control it. The snapshot API lets you essentially automate the process of taking a snapshot.
If your application is a Silverlight browser application, you cannot use the snapshot API. (This is due to security restrictions in Silverlight.) |
RedGate.MemoryProfiler.Snapshot.TakeSnapshot()
whenever you want to take a snapshot. This method returns true
on success and false
on failure. To take a snapshot and give it a memorable name at the same time, provide a string argument to the TakeSnapshot
method, for example: RedGate.MemoryProfiler.Snapshot.TakeSnapshot("Clicked button")
.We recommend that you contain the |