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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Docking Manager memory leak

Thread ID:





67761 Aug 29,2007 05:23 PM UTC Aug 19,2011 06:08 PM UTC WinForms 8
Tags: Tools
Asked On August 29, 2007 05:23 PM UTC

I am programming with c# visual studio 2005 and syncfusion 4.4

I Create DockingManager and insert to there a form.
for remove the form from the DockingManager i write the next code:

m_DockingManager.EnableDock(myForm, false);
myForm.Parent = null;

This code remove the form from the controlsArray in the DockingManager but when i run the .net memory profiler to check if the form is really release from the memory,i discoverer that the DockingManager still holding the form in inner hashtable.bucket[] member.

how i absolutely remove the form from the docking manager?


Golda Rebecal [Syncfusion]
Replied On September 1, 2007 12:48 PM UTC

Hi Yuval,

Sorry for the delay in responding.

I am afraid that I am not able to reproduce the issue you have mentioned. Please refer to the sample that I used to test this issue and .NET profiler result available in the link given below:

In the attached sample, I have removed a form from the DockingManager in a ButtonClick event. I checked it in .NET profiler and I could not find the issue you have mentioned.

Could you please provide a sample having the issue? This will help us to resolve the issue soon.

We appreciate your interest in Syncfusion products.

Best regards,

Yuriy Zubarev
Replied On September 2, 2007 07:54 PM UTC

I was reporting memory leaks since early versions of Essential Tools at least two years ago and Syncfusion never addressed the issue. I don't believe they ever will.

Replied On September 3, 2007 05:12 PM UTC

Thank you on the answer!

This code is casued to the memory leak:

public class Form1 : Form
UserControl uc;

public Form1()
// In the initializeComponenet i add a DockingManager class and 2 button

uc = new UserControl();

// Add UserControl to the docking manager
private void button1_Click(object sender, EventArgs e)
// The paramters for the rectangle doesn't matter
Rectanagle rec = new System.Drawing.Rectangle(200, 200, 200, 100);

dockingManager1.FloatControl(uc, rec);
dockingManager1.DockControl(uc, this, DockingStyle.Tabbed, 200);

// This 2 rows is caused the memory leak, without this rows the uc is relese from the memory
dockingManager1.SetDockAbility(uc, DockAbility.None);
dockingManager1.SetOuterDockAbility(uc, DockAbility.None);

// Remove User Control From the docking manager
private void button2_Click(object sender, EventArgs e)
dockingManager1.SetEnableDocking(uc, false);
uc.Parent = null;
uc = null;



Mohamed Suhaib Fahad A. [Syncfusion]
Replied On September 6, 2007 02:05 PM UTC

Hi Yuval,

Sorry for the delay.

I have identified the memory leak is in DockStateControllerWrapper is not getting disposed when the object closes. I have filed a defect report for this. This would be analysed so that there are no code breaks and fixed appropriately.

The architecture of DockingManager is very big, we are working up on cleaning up all the unwanted objects that stays there in the memory. However, in our future releases we expect each product to be cleaned up from memory leaks.

Please let me know if you want any more details.


Replied On April 22, 2008 03:28 PM UTC

>The architecture of DockingManager is very big, we are working up on cleaning up all the unwanted objects that stays there in the memory. However, in our future releases we expect each product to be cleaned up from memory leaks.

Considering that the Memory Leaks problems are still present in 6.2.x.x, what do you mean "exaclty" when you say "in our future releases we expect each product to be cleaned up from memory leaks"?

Administrator [Syncfusion]
Replied On May 10, 2008 01:14 AM UTC

I confirm this is still happening in 6.2 also;
Seems to affect any MDI child form.

Using tabbed mdi.

I am not seeing it referenced by a DockingStateControllerWrapper; it appears to be referenced as a key of one of DockingMananger's private hashtables.

Administrator [Syncfusion]
Replied On May 10, 2008 01:51 AM UTC

If you add this derived class:
internal class DockingManagerExtended:Syncfusion.Windows.Forms.Tools.DockingManager
public DockingManagerExtended():base()
public DockingManagerExtended(System.ComponentModel.IContainer container)
: base(container)

public void PurgeControlReference(Control ctrl)
this.SetEnableDocking(ctrl, false);
// Remove the control from the extended property hashtables
if (this.htText.Contains(ctrl)) this.htText.Remove(ctrl);
if (this.htIcon.Contains(ctrl)) this.htIcon.Remove(ctrl);
if (this.htFloatOnly.Contains(ctrl)) this.htFloatOnly.Remove(ctrl);
if (this.htHiddenOnLoad.Contains(ctrl)) this.htHiddenOnLoad.Remove(ctrl);
if (this.htAllowFloating.Contains(ctrl)) this.htAllowFloating.Remove(ctrl);
if (this.htCustomCaptionButtons.Contains(ctrl)) this.htCustomCaptionButtons.Remove(ctrl);
if (this.htDockAbility.Contains(ctrl)) this.htDockAbility.Remove(ctrl);
if (this.htOuterDockAbility.Contains(ctrl)) this.htOuterDockAbility.Remove(ctrl);


and call that method on the dispose event of the child forms; it seems to release the references.
In my app, it seems that htAllowFloating was always culprit

Cyril George
Replied On August 19, 2011 06:08 PM UTC

Perfect Syncfusion -- way to go!
This issue exists in 9.1 too.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon