Hello,
We’ve observed that SyntaxEditor instances may remain in memory longer than expected after disposal, and memory profiling points to *.Automation.Peers.* as potential references. We're unsure of the exact root cause, but it resembles some issues with WPF UI Automation behavior that we have found.
Here are some related discussions we found:
-
https://stackoverflow.com/questions/51376740/windows-uiautomationelement-memory-leak
-
https://stackoverflow.com/questions/18832122/uiautomation-memory-issue
Here is a screenshot of what we find in the Visual Studio memory profiler: https://ibb.co/CK7DH0C7
In one case, a workaround mentioned waiting ~3 minutes (due to an internal timer) before calling GC.Collect(), which aligns with some of our testing.
Do you have any guidance or recommended approaches for handling this scenario with SyntaxEditor?
Thanks
[Modified 7 months ago]