I am using docking manager in my application. I am handling the DockVisibility changed event in the mail form. I am setting the visiblity of the the control to flase to when the user clicks the close(x) menu by calling the method SetDockVisibility. Also i am calling Dispose method of the control.
After doing this i found that the docking manager still has a reference to the disposed control and it is not dispose or close the control. The control has reference to huge amount of memory reference. How could i remove the control permenently from docking manager to reclaim the referenced memory. Here i attached a sample programe to represent the above problem.
1. Run the application.
2. Open the Task Manager and see the Performance tab and see the MemUsage Section.
3. Click the new Menu in the application.
4. Now look at the MemUsage section in Task Manager
5. Close the Form2 tab and see the MemUsage section in Task Manager. You can see that the memory climed is still there after closing the Form2 tab.
6. Now click the Count Menu, a message box pops and show the available controls from the docking manager.
Let me know how to permenently remove a control from Docking Manager.
ADAdministrator Syncfusion Team June 23, 2004 05:07 PM UTC
It is necessary to call the DockingManager.SetEnableDocking() method on the dockable control with a FALSE param to completely remove it from the docking manager. You can do so from within your DockVisibilityChanged event handler after examining that the event was generated in response to the control being hidden (calling DockingManager.GetDockVisibility() will return FALSE). There was a problem when calling the SetEnableDocking() method from the DockVisibilityChanged event in the 2.0 release of Essential Suite, but this has since been fixed. So if you encounter trouble with the implementation please contact our support team for a more recent build of Essential Tools.