We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

memory leak in XP menu package after upgrade from 3.2.1 to 3.3.0

Hi, our application consist of several MDI forms which can be opened and closed independently. Each MDI form uses the XP menu package (MainFrameBarManager, ChildFrameBarManager). With Essential Studio version 3.2.1 we had no memory leaks. With version 3.3.0 we have memory leaks caused by BarItems referenced by some Syncfusion internal structures. A modified version of the XPMenus tutorial shows the same problems. SCI tech memory profiler shows the following root path to the already disposed main form MDIMainForm MainFrameBarManager MergedBar BarControlInternal EventHandler MenuColors MenuColorsChanged Any suggestions ? Regards, Bernhard

3 Replies

AD Administrator Syncfusion Team October 6, 2005 08:58 PM UTC

Hi Bernhard, Due to the required behavior in a MDI Merging scenario, references to BarItems, Bars, etc, stick around. If the BarItems have any registered event handlers in a Form, that Form will not be disposed due to the references still existing. Unregistering any appropriate event handlers should cause the Form to be correctly collected and disposed. Regards, Gregory Austin Syncfusion Inc.


BE Bernhard October 7, 2005 02:29 PM UTC

Hi Gregory, thanks for the response. All objects, directly created by the user code were disposed (their Dispose method was called), but they were not garbage collected. I followed your advise and unregistered all of my event handlers. This was not sufficient, all XPMenus.Bar objects of the MdiMainForm required a Dispose as well. After that, the form was garbaged collected. BarItems and support objects remained in memory (some of them had their Dispose method called) After that, I had some more memory leaks caused by XPMenus.PopupMenu (not present in version 3.2.1) For all PopupMenus I had to call MessageFilterEntryHelper.RemoveMessageFilter( myPopup); I am a little bit afraid, that the next time I add a Popup or a BarItem, I forget to call the special helper method. I am a little bit afraid, that an upgrade to the next version of Essential Studio will cost me some days fixing similar issues. Regards, Bernhard


JI Jim October 21, 2005 09:31 PM UTC

Is this problem being addressed? I was just considering using the XPMenus when I read this.

Loader.
Live Chat Icon For mobile
Up arrow icon