title: Can I programmatically view the managed heap contents from a .NET application?
body: <p>Is it possible to access the managed heap in a .NET application and e.g. enumerate the objects that are currently allocated there?</p>
  
  <p>I know there are various tools out there that allow you to do that, but I would rather do this myself from code so that I can use it in automated tests, like for checking if everything is disposed and cleaned up after closing a form.</p>