COM Interop Component Stays In Memory
I have a COM component written in Visual Studio 6 ATL. This is an out of process exe. From C# .NET I can instantiate and call this component but after开发者_高级运维 the function that calls it is complete, the exe of the component remains loaded in the task manager.
Is this normal in .NET? When I call it from a test app written in Visual C++ 6, it unloads itself.
In .NET, all I have done is Add Reference and selected the COM component in the list. And then created an instance of it by calling new.
The issues you are seeing are the same as from this question: How do I properly clean up Excel interop objects?
This is a good description of what is going on under the covers: http://blogs.msdn.com/b/cbrumme/archive/2003/04/16/51355.aspx
精彩评论