Add a helper to getAccessibleChildren#13126
Conversation
Make all usages of AccessibleChildren conform to a consitant approach. Management of resources is automatic.
1b675b8 to
2a7e8c1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| LOG_DEBUG(L"Error in calling fillVBuf"); | ||
| childPacc->Release(); | ||
| VariantClear(&(varChildren[i])); | ||
| child.Clear(); |
There was a problem hiding this comment.
All the calls to child.clear are not necessary I think, as CComVariant's destructor does this itself.
There was a problem hiding this comment.
Yes, you are right, explicitly calling clear isn't necessary. I left them in to maintain the existing timing of the release. As much as possible I was trying to avoid the output binary from changing. I can look at this again if you would like?
michaelDCurran
left a comment
There was a problem hiding this comment.
A part from possibly removing the calls to CComVariant.clear (as the destructor already does this), This all looks good to me.
|
Since the open question doesn't seem to be a matter of correctness, and this is blocking the subsequent change (#13127), I'd like to merge this now. I'm happy to follow up to remove the calls to |
Link to issue number:
None
Related to #13106
Summary of the issue:
While working on #13106 I noticed several different approaches to get accessible children.
Description of how this pull request fixes the issue:
Make all usages of AccessibleChildren conform to a consitant approach (with the exception of getIAccessibleText, which will be addressed separately, via #13127)
Resources are now managed with smart pointers.
Testing strategy:
Known issues with pull request:
None
Change log entries:
None
Code Review Checklist: