If I run the Window4.xaml sample from the avalondock-45809 build and perform the follow steps.
- Click Add Documents (Adds 5 DemoDocuments to bound Observable collection)
- take memory snapshot using .Net Memory Profile verify 5 instances of DemoDocument
- Close Document 0 via the context menu)
- take memory snapshot using .Net Memory Profile verify 5 instances still remaining of DemoDocument
- Subsequent closes result in removal of instances of DemoDocuments as expected, so that when I have removed all 5 DemoDocuments, I still have 1 Instance remaining.
- Click Add document a second time
- take a memory snapshot using .Net Memory Profile, now I have 6 instances of DemoDocument in memory but only 5 in view
I can do this repeatedly and app will continue to use up memory