Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Contextual Tab Groups At Runtime

I am building contextual tab groups at runtime along with MDI forms.  When I am ready to display a new form, I build my tab group and call the RefreshMerge method on my main form.  Everything displays properly and works great.  However, when I close my child MDI form, I am noticing a memory leak and the child form never disposes completely.

I have tried writing code that disposes each individual tool I add along with any popup galleries, ribbon groups, etc.  However, the child form still never disposes completely  The ANTS memory profiler tool show objects in the MergedTools Collection.  Since I called the RefreshMerge on the main form's toolbarsmanager, I am wondering if there is anything else I need to dispose of.  There appears to be a MergedTools collection somewhere.  Is there a different method I should be calling to "unmerge" the child MDI form from the main form?

Parents Reply Children