Freeing memory

Apr 5, 2013 at 1:19 PM
Hi all and thanks for the great work. I'm using ribbon with MDI WinForm in Visual Studio 2010 (.NET Framework 4.0). I have a major problem with this project, no freeing memory. I will try my best to explain with an example.

My application opens a MDI form that contains one button and a Ribbon with only one Tab. The button is used to open a child form. When I open the child form created a new dynamic tab (with panels and buttons). This allows me to have a static and dynamic Tab in my Ribbon. When I close the form remove a dynamic Tab and Ribbon again has only one Tab. Every time I open the child form and add the dynamic Tab the memory occupied by the program in the OS increases considerably. When I delete the dynamic tab does not release the memory that was used to create it. Therefore, to create a tab if you need 1.5MB of memory and I open and close the child form 10 times the program will increase 15MB but my Ribbon only have one Tab.

How I can do that when I use the method "this.ribbon1.Tabs.Remove(this.mynewtab)" memory release me?

Many thanks.
Apr 9, 2013 at 4:25 PM
Have you disposed the tab after removing?