We're using the ToolbarManager with a bunch of tools and appearances, for a toolbar and context menu. We're using the ANTS profiler to check for memory leakage in our app, after closing the class that uses these controls. I'm having a hard time getting the tools and appearances to be fully disposed - they remain in memory after the class is disposed.
I should mention that I am programmatically creating and associating all of these objects, and programmatically disposing of them (as opposed to using the designer).
The ToolbarManager itself is fully disposed, and the grid we're using is fully disposed, but references remain to the appearances and to all the tool objects.
I can provide details about the references if that'd help debug this, but I thought I'd first ask - is there a doc somewhere showing how to properly dispose of programmatically-created tools and toolbars? Perhaps there's something I'm not doing in my dispose() code that I need to do. I have googled as well as searched your KB and not found any information about this.
I would recommend submitting a sample reproducing the issue to the support group so this can be investigated: http://ko.infragistics.com/gethelp.
I have the same problem. Did you resolve it?
The RAM is ok and we control it but virtual memory grows every time the form create the toolbar and never dispose it. My code has BeginInit..EndInit in InitializeComponent().
This is a very big problem. We saw until 500Mb of virtual memory at the users PC and this is only because of the toolbar because we isolate the problem. The toolbar has 50 tools.
Some help?
Thanks, Mike. I am not using BeginInit() EndInit() and will try that. I've also opened a support request on the issue.
If you programmatically added tools to the toolbars manager and didn't wrap the code adding those tools with BeginInit()...EndInit() calls to the toolbars manager, I believe the tools you added will be cloned when added to the tools collections. If this is the case, chances are you are disposing the original tools only, and not the cloned ones used by the toolbars manager. However, even if this is the case, the toolbars manager should be disposing all its tools, whether it cloned them internally or not. The same is true for appearances. This is probably a bug and I would recommend submitting the issue to the support group: http://ko.infragistics.com/gethelp.