Content reference "leak" in DockingManger

Jan 14, 2009 at 9:22 AM
Edited Jan 14, 2009 at 9:23 AM
As far as I can tell, the DockingManager.ActiveContent property will be set to a DocumentContent when you click on it. If you then start closing all of your DocumentContents, the ActiveContent member is not set back to null on the final Close(). A quick fix (not necesarily a robust fix) is to check if (ActiveContent == this) from within the DocumentContent.Close() function. If it is equal, set ActiveContent to null. This also requires you to fix up the ActiveContent set function so it won't try and dereference the null value.
Apr 28, 2009 at 11:40 AM
Thanks, this worked nicely! That bug was really annoying me.