[AvalonDock 2.0] FinalizeFocusManagement Document Memory Leak

Jul 9, 2012 at 9:45 AM

Hi,

There appears to be a memory leak when closing tabbed documents. When closing the active document it is removed from the static dicitionary _modelFocusedElement in the FinalizeFocusManagement class. But when closing a tabbed document which isn`t the currently active one by clicking the X in the tab it is not removed from the _modelFocusedElement causing a memory leak.Using WinDbg I could see that the FinalizeFocusManagement was holding a reference to my ViewModel via the _modelFocusedElement static dictionary.

I`ve not looked any further into fixing the issue or raised an issue tracker yet incase anyone is aware of this and has a fix.

thanks

Darran

Jul 9, 2012 at 4:28 PM

Thanks for the critical issue report, I'll fix it ASAP,Ado

Jul 9, 2012 at 5:50 PM

Sounds good Ado. I was going to submit a patch as I was thinking the FinalizeFocusManagement.RefreshDetachedElements() could be called when a document close is detected. Though I`ve not looked at the code too hard and obviously your the best person to make judgement on whats the best approach :)

Really like version 2.0 by the way and the redesign. Works like a charm and plays well with our MVVM model + ninject. 

Jul 20, 2012 at 4:50 PM

Hi,

Please can you tell me the current status of this issue (I can't find it in issue tracker). I think it may be causing me problems too.

 

Jul 23, 2012 at 10:05 AM

This issue has been fixed,Ado

Oct 2, 2012 at 8:19 PM
Edited Oct 2, 2012 at 8:19 PM

Hi Ado,

how can this issue be fixed in version 1.3.3600.0?  We are using this version and are too late in our project to switch to version 2.  We really need these screens to be garbage collected.

thanks