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
4133
Contextual Tab Groups At Runtime
posted

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
No Data
Reply
  • 12480
    Offline posted

    Hi Richard,

    It sounds like you are using the ToolbarsManager correctly. The behavior you describe is unusual, as the tools from the closed form should be released when the form is closed. If it is possible for you to provide a sample application that reproduces the leak, we can look into it over here and try to determine what's causing it. If you would prefer not to upload to the public forum, let me know and I will open a support case to receive the sample.

    Please let me know how you choose to proceed.

Children