UI自动化回调中COM对象的所有权 [英] Ownership of COM objects in UI Automation callbacks

查看:60
本文介绍了UI自动化回调中COM对象的所有权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

UI自动回调,例如:https://msdn.microsoft.com/en-us/ library / windows / desktop / ee696052(v = vs.85).aspx接收in参数  IUIAutomationElement
*发件人。
事件处理程序是否应该对此对象调用Release()?

UI Automation callbacks such as https://msdn.microsoft.com/en-us/library/windows/desktop/ee696052(v=vs.85).aspx receive an in parameter IUIAutomationElement *sender. Should the event handler call Release() on this object?

干杯

推荐答案

没有。 如果您在
如何实现事件处理程序请注意,事件处理程序不会通过这些接口指针调用Release()。


Nope.  And if you examine the sample code at How to Implement Event Handlers notice that the event handlers do not call Release() through those interface pointers.


这篇关于UI自动化回调中COM对象的所有权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆