0

I know there have been some major improvements in Visual studio 2010 for debugging things like memory leaks from dump file etc. I wonder if it has any improvements specifically debugging memory leak for COM interop scenarios?

Silverlight Student
  • 3,968
  • 10
  • 37
  • 53

1 Answers1

0

There's no specific way to test for memory leaks in unmanaged code in VS, especially from a managed host point of view. It gets even worse if you have no access to the unmanaged code.

My suggestion would be to create a bunch of instances of the COM object and repeatedly call its methods then dispose of the objects. If the memory usage just keeps increasing, there's probably a memory leak.

Then the real trick is to find it! There are a lot of ways to do this (way too many to enumerate here) so I'd suggest a quick Google for memory leak debugging tools.

Polynomial
  • 27,674
  • 12
  • 80
  • 107