Current filter:
                                You should refresh the page.
                                0
                                  • It appears that there is a memory leak in the XtraBars.Ribbon.RibbonControl

                                    I have been searching for hours to discover why my forms are remaining in memory. If the form (XtraEditors.XtraForm) contains a RibbonControl, then the form shows in ANTS Memory Profiler as 'Disposed but still in memory'.

                                    If I modify the Dispose method of the form to call RibbonControl1.Dispose() before components.Dispose() then the form removes itself from memory as expected.

                                    Steps to Reproduce:

                                    Create a Windows Forms Project with a RibbonForm as the startup form, with an XtraTabbedMdiManager on the form.

                                    Create an XtraForm as the child form. Place a button in the main RibbonForm's Ribbon and wire it up to open the child form as an mdiChild of the main form.

                                    Create a button on the child forms ribbon and wire it up to just call this.Close();

                                    View in ANTS Memory profiler to see the leak.

                                0

                                Hi Trevor,

                                Our RibbonControl is supposed to be displayed on the RibbonForm. The RibbonForm is an XtraForm class descendant which stores a link to its ribbon in the RibbonForm.Ribbon property and should dispose of the RibbonControl property.

                                Please try to set your form's parent to the RibbonControl and assign your RibbonControl to the form's Ribbon property. Does this help?

                                Thanks
                                Dimitros

                                0

                                Hi Dimitros.

                                I have attached a small project that does nothing but open and close mdi forms. They are done the way you suggest, using the actual RibbonForm and also the wrong way; which is the way I have been doing it up to now; which is to create a DXForm and drag a ribboncontrol component onto it. If you runn the program with a memory profiler; open several "rightway" forms and several "wrongway" forms, then close them all you will see that every instance of the ribbon form created "the correct way" survives in memory permanently. Every form done "the wrong way" has been cleared from memory.

                                WindowsFormsTest.zip
                                0

                                Hi Trevor ,

                                Thank you for the sample project.

                                I've tested it, but was unable to reproduce the problem. Please see the attached video.
                                What am I doing wrong? Can you please capture a video illustrating required steps?

                                Thanks
                                Dimitros

                                dx_video.swf
                                0

                                Video attached.

                                You might notice from the video that I have started building up the form looking at other scenarios. You can ignore that, so far the only leak I have detected is the original one which is present in the demo app I sent you.

                                Thanks

                                Trevor

                                memleak.wmv
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.