处理来自第三方 ActiveX 控件包装器的所有 GDI 对象
我创建了一个 C# ActiveX 控件包装器,用于包装第三方 ActiveX 控件。
我已注册 ActiveX 控件包装器,并且可以将其添加到 Dynamics AX 中的表单中。当我打开表单时,每次都会创建大约 400 个 GDI 对象。然而我遇到的问题是,当 AX 窗体关闭时,没有任何 GDI 对象被释放。
最终我在 AX 中收到以下错误。
我的 C# 包装器中有一些方法,我可以从我明确创建的包装中调用这些方法在第三方控件上调用 Dispose。然而,这只清理了大约一半创建的 GDI 对象 (~200/400),
因此问题是每次打开和关闭 AX 表单时,都会创建大约 200 个新 GDI 对象。
我还可以考虑什么来删除创建的其余 GDI 对象(或几乎所有对象?)
I have created a C# ActiveX control wrapper than I am using to wrap a third party ActiveX control.
I have the ActiveX control wrapper registered and I can add it to a form in Dynamics AX. When I open the form ~400 GDI objects are created each time. However the problem I have is that when the AX form is closed, none of the GDI objects are released.
Eventually I get the following error inside AX.
I have methods that in my C# wrapper that I can call into from the Wrap I created where I am explicitly calling Dispose on the third party control. However that only cleans up around half of the GDI objects created (~200/400)
So the problem is everytime the AX form is opened and closed around ~200 new GDI objects are created.
What else can I be looking at to get rid of the rest of the GDI objects created (or nearly all of them?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个已知的错误,并且有可用的修补程序。但这是 2009 SP1 的问题。
在动态论坛上关注此讨论:http://community .dynamics.com/product/ax/f/33/p/30936/52754.aspx
知识库中提供了此修补
程序的链接 网格过滤是此问题之一,但最好检查一下。
This is a known bug, and a hotfix is available for that. This however is an issue with 2009 SP1.
Follow this discussion on the dynamics forums: http://community.dynamics.com/product/ax/f/33/p/30936/52754.aspx
A link is available in the KB for this hotfix
Filtering of the Grid is one of the issues of this, but will be good to check it.