There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
[Version 2: Commit 94905] LayoutAnchorable Memory Leak (LayoutRoot)
If you progmatically add a LayoutAnchorable to a LayoutAnchorablePane then close the LayoutAnchorable, the anchorable sticks around in the LayoutRoot. If you do this repeatedly, many objects build up rapidly.
Step 1) Add an anchorable to your pane:
LayoutDocumentPane pane = layoutRoot.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(p => p.Name == "myAnchorablePane");
Step 2) Close the window that showed up in the UI.
Step 3) Repeat several times.
Step 4) Check the ChildrenCount of your LayoutRoot. It is higher than expected. Evaluate the Children of the LayoutRoot. There are a bunch of LayoutAnchorables that you never put there yourself.