本文介绍了通过com接口调用时,字体对象未释放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在我的c#应用程序中,Com接口用于从非托管代码调用由托管代码(c#)创建的自定义消息框.长时间运行应用程序后,GDI对象正在增加.字体对象的数量每次都增加.在非托管代码中使用Coinitialize和Couninitialize来初始化com.
谁能说出这种现象的原因?

Hi,
In my c# application,Com interface is used to invoke custom message box created by managed code (c#) from unmanaged code.After running application for long time,GDI objects are getting increased.While analysing by GDI view, it shows like Font objects are not getting released.Font objects number getting increased each time.Coinitialize and Couninitialize were used in unmanaged code for initializing com.
Can anyone tell reason for this behaviour?

推荐答案



这篇关于通过com接口调用时,字体对象未释放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 00:40