After I update AvalonDock to Ver.3.0.16174.17450, I've got memory leak.
It occurs even in the simplest case.
(only binding DocumentsSoure with ObservableCollection<object>)
Here are some screenshot to show what is happened.
1st image shows after my test app launched. It took only 2MB.
2nd image shows after add some documents. It took 21MB and GC can't reduce this, but it's OK.
3rd image shows after I delete all documents and run GC. It still took 21MB.



And if I repeat this process, test app devours RAM.
Attached project is test app in screen shot.
I think this is critical bug, please check and fix this ASAP.
Cheers.
Comments: ** Comment from web user: BoucherS **
It occurs even in the simplest case.
(only binding DocumentsSoure with ObservableCollection<object>)
Here are some screenshot to show what is happened.
1st image shows after my test app launched. It took only 2MB.
2nd image shows after add some documents. It took 21MB and GC can't reduce this, but it's OK.
3rd image shows after I delete all documents and run GC. It still took 21MB.



And if I repeat this process, test app devours RAM.
Attached project is test app in screen shot.
I think this is critical bug, please check and fix this ASAP.
Cheers.
Comments: ** Comment from web user: BoucherS **
Hi,
Make sure you remove the DocumentViewModels when they are removed from the DockingManager :
```
<ad:DockingManager Grid.Row="1"
DocumentsSource="{Binding Documents, Mode=OneTime}"
DocumentClosed="DockingManager_DocumentClosed">
</ad:DockingManager>
```
```
private void DockingManager_DocumentClosed( object sender, Xceed.Wpf.AvalonDock.DocumentClosedEventArgs e )
{
var workspace = this.DataContext as WorkspaceViewModel;
workspace.Documents.Remove( e.Document.Content );
}
```
This way, doing a "GC" will clear some memory.