Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Releasing IRawElementProviderSimple implementations

$
0
0

Hi,

I'm trying to add server-side accessibility to a control and because of that I implemented IRawElementProviderSimple and handed it out during WM_GETOBJECT. So far so good, narrator is now able to read the control's content.

However, during the lifetime of the application, controls get created and destroyed. But nearly all the time the reference count of my IRawElementProviderSimple implementation does not reach zero, the object doesn't get destroyed. Memory consumption increases significantly over the time.

Is there a way to tell the automation client that the control got destroyed and that outstanding references to it should be released? How do I get rid of all these zombie objects?

My environment is Win7 x64, the client is narrator. In order for you to see what I am talking about I modified the "simpleuiaprovider" sample coming with the Windows 7 SDK to destroy/create a new COLORBUTTON every 5 seconds. Start the application under the debugger and keep an eye on the output window (or use DebugView). The test project can be found here: http://www.tbkoenig.de/temp/uiasimpleprovider.zip

Thanks,

Rene


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>