I'm experiencing a memory leak on Windows 10 machine and after investigation of some dump taken from the process causing the issue (a WPF application) I have found many instances of "MS.Internal.Automation.SynchronizedInputProviderWrapper" and basically most objects held in memory and not Garbage collected were referenced by this type.
I have been using dotMemory (key retention path of instances), Visual Studio 2019 (for dump compare) and WinDbg for further investigation.
According to this stackoverflow answer: UIAutomation Memory Issue
Their is an rollup fixing the issue on Win 8 RT & windows 2012 server: https://support.microsoft.com/en-us/help/2885482/memory-leak-when-using-ui-automation-in-windows-8
And according to Microsoft: see this link
When multiple applications that use the UI Automation framework are running at the same time on a Windows 8-based computer, a memory leak occurs, and you experience high CPU usage.
And I think it may be the same issue on Windows 10 also but connot find a fix or rollup fixing this issue.
Update:
I did another analysis with SuperDump and found a potential explanation for the memory leak but I cannot interpret the call stack:
clr!EEHeapAlloc+2c ntdll!RtlAllocateHeap
clr!EEHeapAllocInProcessHeap+5b clr!EEHeapAlloc
clr!ClrAllocInProcessHeap+23
clr!operator new+14 clr!ClrAllocInProcessHeap
clr!ComCallWrapper::CreateWrapper+1ce clr!operator new
clr!ComCallWrapper::InlineGetWrapper+24 clr!ComCallWrapper::CreateWrapper
clr!GetComIPFromObjectRef+22e clr!ComCallWrapper::InlineGetWrapper
clr!MarshalObjectToInterface+3a clr!GetComIPFromObjectRef
clr!StubHelpers::InterfaceMarshaler__ConvertToNative+d8 clr!MarshalObjectToInterface
0x4AA1110 clr!StubHelpers::InterfaceMarshaler__ConvertToNative
PresentationCore_ni!System.Windows.Media.DashStyle.OffsetPropertyChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)$##6001EA6 <PERF> (PresentationCore_ni+0x19cca0)
clr!COMToCLRDispatchHelper+6b
clr!COMPlusFrameHandlerRevCom
UIAutomationCore!RichEditObjectProxy::QueryInterface+6139
UIAutomationCore!NullInvoker::CallTarget
UIAutomationCore!InProcClientAPIStub::UiaNode_GetPatternProvider
UIAutomationCore!RichEditObjectProxy::QueryInterface+6116
UIAutomationCore!InProcClientAPIStub::InvokeInProcAPI+5eb
UIAutomationCore!UiaNode::CrossProcess_GetPatternProvider+49 UIAutomationCore!InProcClientAPIStub::InvokeInProcAPI
UIAutomationCore!RemoteUiaNodeStub::Incoming_GetPatternProvider+8c UIAutomationCore!UiaNode::CrossProcess_GetPatternProvider
UIAutomationCore!RemoteUiaNodeStub::OnMessage+b8
UIAutomationCore!InvokeOnCorrectContext_Callback+272
UIAutomationCore!NullInvoker::CallTarget+2b UIAutomationCore!InvokeOnCorrectContext_Callback
UIAutomationCore!ProcessIncomingRequest+4f6
UIAutomationCore!ChannelBasedServerConnection::OnData+dd
UIAutomationCore!ReadWriteChannelInfo::Service+18a UIAutomationCore!ChannelBasedServerConnection::OnData
UIAutomationCore!OverlappedIOManager::IoThreadProc+b3 UIAutomationCore!ReadWriteChannelInfo::Service
UIAutomationCore!OverlappedIOManager::StaticIoThreadProc+d UIAutomationCore!OverlappedIOManager::IoThreadProc
kernel32!BaseThreadInitThunk+19
ntdll!__RtlUserThreadStart+2f
ntdll!_except_handler4
ntdll!FinalExceptionHandlerPad22
UIAutomationCore!OverlappedIOManager::StaticIoThreadProc
Thanks