Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/uia_provider.c:
- /* Provider thread hasn't been started, no nodes to disconnect. */
- if (!provider_thread.ref)
goto exit;
- LIST_FOR_EACH_SAFE(cursor, cursor2, &provider_thread.nodes_list)
- {
prov = LIST_ENTRY(cursor, struct uia_provider_thread_list_entry, entry);
if (uia_compare_runtime_ids(sa, prov->runtime_id))
{
list_remove(cursor);
node_data = impl_from_IWineUiaNode((IWineUiaNode *)prov->node);
node_data->in_provider_thread_list = FALSE;
IWineUiaNode_disconnect((IWineUiaNode *)prov->node);
SafeArrayDestroy(prov->runtime_id);
Can we avoid a linear search here? Perhaps with `wine/rbtree.h`?