GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Memory leak fixed. DocPane was holding reference to the last document. This is normally not a problem, however when the document is large, and will not be reused - meaning there will be no another ActiveContent on the particular pane, the memory will never be collected.
Memory leak fixed. DocPane was holding reference to the last document.
Thank you for submitting a pull request, it's great to see participation in this project!
Unfortunately, although the issue is valid, this request cannot be accepted. The first thing to note is that DockPane.m_activeContent should not be manipulated directly. It is set via the ActiveContent property which contains important state validation on the new value.
I believe the correct approach here will be to make sure ValidateActiveContent() is called on the pane when the last item is closed/hidden. The most appropriate place for this call is likely in DockPane.CloseContent() but I will need to verify that.
My memory leaks fix for 2.5.1RC1:
--- tags/Release_2.5_RC1/WinFormsUI/Docking/DockContentHandler.cs (revision 115)
+++ tags/Release_2.5_RC1/WinFormsUI/Docking/DockContentHandler.cs (working copy)
@@ -39,6 +39,10 @@
+ if (Pane != null && Pane.DockPanel != null)
DockPanel = null;
if (m_autoHideTab != null)
This method could be internal.
Already cherry picked in upstream.