Memoryleak in Deckworkspace?

Feb 4, 2010 at 10:24 PM


it seems, that the Deckworkspace does not dispose the smart parts when a form which contains it is closed? If so, how could i achieve this, is there a workaround?


Kind regards


Feb 10, 2010 at 12:44 AM

I'm unable to reproduce this.  I've created a simple application that has a From with a DckWorkspace on it.  When the Form closes, it automatically Disposed the DeckWorkspace (no code added by me - it's in the Form's Controls collection becasue I dropped it on the Form in the designer).

When I close the containing Form, the Form automatically calls Dispose on the Workspace.  Since all SmartParts are held in the Controls collection of the Workspace (which is a ContainerControl derivative), those SmartParts get Disposed as well.  This all happens with no code on my part.

I verified this by modifying the Workspace base class and hooking the Disposed event of all SmartParts in OnShow.  The event handler does indeed get called for the SmartParts when the containing Form is Closed as expected.

Feb 11, 2010 at 8:54 AM

I use a combination between  Mobile Application Blocks ( and your framework. Seems like i handle something wrong....


Besides, thank you for your great work :-)