Forum Visual Studio

Documentation on how to find leaks using Profiler?

JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭

I need to find the source of some pretty consistent leaks we've got in our app.

I'm struggling to find a good description of how to use Profiler to identify the source of leaks. I've looked at:

but these still leave a lot to be desired!

Given my understanding of Profile and Snapshots, I'd hope that I could:

  1. Run the app to a state with stable memory.
  2. Take snapshots until memory is stable (i.e. the number of new objects is 0) - Snapshot A
  3. Perform the operation I think is leaking.
  4. Take snapshots until memory is stable - Snapshot B

I was expecting to now be able to see which Objects are left behind since Snapshot A. However I'm afraid this isn't clear. The articles above indicate that it's the objects at Snapshot A which are 'Live' - but this would include lots of objects which we would expect to still be live - e.g. long-lived objects, surely.

Is there a good description of how to identify those Objects which have been left behind after performing my suspect leaking operation?


  • nefgrixisnefgrixis Member ✭✭

    Hey have you figured this out? I'm on the same boat right now. Not sure if the pictures I have are taking up all the memory or if it is something else in my code.

Sign In or Register to comment.