
Hi,
we found a memory leak with the following repro steps:
- Start the app
- Add a document window to a dock site
- Raft the tab
- When the tab is rafted, close it
In this image, you can see a memory state taken after step 4. The sample app I prepared opens a DocumentWindow containing a simple user control (MyControl). As you can see in the image the window containing the control is still being referenced by TabbedMdiHost after closing it.
Please note that if, after step 4, you create another tab, then the previously referenced DocumentWindow is removed and can be garbage collected. However we cannot suppose users will always keep opening new tabs, so in practice this is indeed a memory leak.
Also note that with the following steps
- Start the app
- Add a document window to a dock site
- Close it
The problem does not repro. So it's really somehow related to rafting.
I would be glad to provide the sample app the the full ANTS profiling data (but I couldn't find a way to upload content in this forum)
Thanks,
Sam