开发者

COM Interop Component Stays In Memory

开发者 https://www.devze.com 2023-03-15 11:29 出处:网络
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 functionthat calls it is compl

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号