After recording or playing back with Ranorex, yes. Without it, there are no AutomationPeer objects being created. Even several minutes after Ranorex has stopped there are still thousands of AutomationPeer objects.* When you debug your application, you see that AutomationPeer objects are staying behind?
No, only after and during recording / automating. When doing it manually the memory stays stable.* And you do not see those objects if you manually perform the same steps you do aut
Not that we are aware of - the problem has been reproduced on virtual and real machines, on a variety of setups and versions of Windows. We've been looking into this but haven't found any likely program so far, but we'll keep looking. There aren't any tablet services running, but just in case I followed this: msdn.microsoft dot com/en-us/library/dd901337(v=VS.90).aspx (replace 'dot' with a '.' - I'm not allowed to post URL's) to disable Tablet support (no effect).* Is there any other software running that could also use UIA and cause the object to not be released? E.g. screen narrator, accessibility or automation software, anti-virus program, ...? (This blog points out that the Tablet PC Input Services can also cause AutomationPeer objects not to be cleaned up.)
We've tried it in safe mode (in Windows Server 2008), the leak still occurred.* You may want to start your OS in protected mode and try to reproduce the leak again to rule out influence of other software...
Taking away elevated permissions doesn't seem to make a difference, the leak still appears. Elevated permissions is a Silverlight property and so we can't run Ranorex with it - however, running Ranorex as an administrator also doesn't seem to make a difference.* In the original post, Mark mentioned you start the Silverlight app "with elevated permissions". Have you tried running it with default permissions? Is Ranorex running with the same rights?
If it's possible, could you inspect the Manager Peer Dictionary in your profiler and examine the Automation Peer objects (as you're not experiencing the leak you may have to do this during the automation while the AutomationPeers haven't been GC'd yet). Looking at ours, the majority of elements in the dictionary are weakly referenced, but all AutomationPeer objects are ManagedObjectReferences - are you also seeing this?