diff --git a/source/Components/AvalonDock/Layout/LayoutRoot.cs b/source/Components/AvalonDock/Layout/LayoutRoot.cs index 957b8a8f..314ae015 100644 --- a/source/Components/AvalonDock/Layout/LayoutRoot.cs +++ b/source/Components/AvalonDock/Layout/LayoutRoot.cs @@ -383,9 +383,9 @@ public void CollectGarbage() //for each pane that is empty foreach (var emptyPane in this.Descendents().OfType().Where(p => p.ChildrenCount == 0)) { - //...set null any reference coming from contents not yet hosted in a floating window + //...set null any reference coming from contents foreach (var contentReferencingEmptyPane in this.Descendents().OfType() - .Where(c => ((ILayoutPreviousContainer)c).PreviousContainer == emptyPane && !c.IsFloating)) + .Where(c => ((ILayoutPreviousContainer)c).PreviousContainer == emptyPane)) { if (contentReferencingEmptyPane is LayoutAnchorable anchorable && !anchorable.IsVisible)