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?
Asked
Active
Viewed 341 times
0

Silverlight Student
- 3,968
- 10
- 37
- 53
-
What language are you referring to? A lot of the debugging is specific to whether you are using managed or unmanaged code. – Polynomial Nov 01 '11 at 21:02
-
C# on managed side; COM is C++ – Silverlight Student Nov 01 '11 at 21:04
1 Answers
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