Hi,
I think that I have a little problem with the UltraToolbarsManager component. I use a lot an inherited version of the ToolbarsManager called UCToolbar in my program and it seems to be a source of memory leak.
When I close a form containing an UCToolbar, the dispose() method of my toolbar is called but the memory seems not to be freed. I used Dot Trace and saw that my Toolbar was kept alive by a reference from SystemEvents.UserPreferenceChangedEventHandler. (See the picture for more details).
What can I do for removing this reference which kept alive all my form ?
Thanks for your help,
Regards
Here is the code of my inherited class :
public partial class UCToolbarsManager : UltraToolbarsManager, IUCEditor { public bool EditMode { get { return this.Visible; } set { this.Visible = value; } } public UCToolbarsManager(IContainer container) : base(container) { InitializeComponent(); } }
The UltraToolbarsManager must be disposed when the Form is closed. If you are calling the Dispose method on it, put a breakpoint on the line and make sure it is actually getting called when the Form closes. If it is definitely getting called and the memory leak is still occurring, you can submit the issue to Developer Support here.
Hi lchambaret ,
Having a similar problem to which you describe. tried several things but NO LUCK! i hope that adding this post will prioritize this issue, since it is causing us Memory leaks as well.
my code part is:
public Control BeginPrepareToolbarArea(XElement definition, GenericSession creationContext)
{
var dockArea = new UltraToolbarsDockArea();
{AllowAllUp =
var ultraToolbarsManagerAppearance = new Appearance();
((
dockArea.AccessibleRole =
AccessibleRole.Grouping;
dockArea.DockedPosition =
DockedPosition.Top;
dockArea.Location =
new System.Drawing.Point(0, 0);
dockArea.ToolbarsManager = mgr;
ultraToolbarsManagerAppearance.FontData.Name = DefaultFontName;
mgr.Appearance = ultraToolbarsManagerAppearance;
mgr.DesignerFlags = 0;
mgr.OptionSets.Add(defaultOptionSet);
mgr.ShowFullMenusDelay = 500;
mgr.ShowMenuShadows =
DefaultableBoolean.False;
mgr.ShowQuickCustomizeButton =
false;
mgr.UseOsThemes =
mgr.ToolbarSettings.AllowFloating =
mgr.RightAlignedMenus =
mgr.RuntimeCustomizationOptions =
RuntimeCustomizationOptions.None;
creationContext[
"ToolbarsManager"] = mgr;
"ToolbarsDockArea"] = dockArea;
return dockArea;