Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Memory leak when calling AutomationElement::ElementFromPoint on Items View object


Symptoms

If an application requests many AutomationElements from an Items View, as described in the How to Query a Virtualized Item in Items View documentation, then the Items View may slow down and become non-responsive. For example, the Items View may scroll items more slowly or it may take longer to change column sizes.

↑ Back to the top


Cause

When an AutomationElement is retrieved from an Items View it is never fully released. This causes updates to the state of the Items View to iterate through all of the previously queried AutomationElements.

↑ Back to the top


Resolution

There is no way to recover the Items View short of exiting the process which owns the Items View.

Depending on the specific details of the automation application, it may be able to avoid the problem by requesting fewer AutomationElements (many operations which require that can be done via IFolderView2 instead) or by coercing the shell into using the Vista style ListView instead of the Items View (via IFolderViewOptions::SetFolderViewOptions(FVO_VISTALAYOUT,FVO_VISTALAYOUT).

↑ Back to the top


Keywords: kbenable, kbshellgrp, developerui, kb

↑ Back to the top

Article Info
Article ID : 2462524
Revision : 1
Created on : 1/7/2017
Published on : 11/16/2010
Exists online : False
Views : 155