Any Infragestic control you use leaks memory. In testing, I've found that UltraTextEditor, UltraTabControl, UltraComboEditor, UltraButton, etc... All do not dispose of themselves correct and all are held in memory due to a strong reference from Infragestics.Win.Office2007ColorSchemeChangedNotifier, which is held by a static event handler.
Just recently the major memory leaks with win tree were reduced to a point where it could be used in production code. I did a sweep of a couple sub system to use all Infragestic control to take advantage of themeing and when from 20-30k memory leaked per sub system instantiation to 5 megs+ leaked.
Seeing how bad the leaks are, surely someone has a work around? Is there a hot fix for this yet?
Are the controls actually being disposed? If they are explicitly being disposed (which should happen when they are part of a form's Controls collection and that form is properly disposed), this could be a bug, though I'm not sure.
You may also want to take a look at this thread, which has some discussion on the matter.
-Matt
I had already read that thread. The controls that are leaking are on a pop-up dialog that is in a using statement. I have verified that the form dispose is being called and I explicitly called dispose on all of the ultraButton as a test and use a try finally around the using statement and
GC.WaitForPendingFinalizers();
To insure everything is freeded. However, memory still leaks and I used dotTrace from jetBrains to track down why. Thee is a static class member than holds a reference to an event handler for colorSchemeChanged on every ultra control I use. That event is linked to Office2007ColorSchemeChangedNotifier. The thread you pointed me too has the exact same problem and was indentified in June 2008. Yesterday I installed the latest hot fix and hte problem still persists. I'm shock that after 8 months there is still no fox or work around for this. :(
The test case associated with the case leaks window handles and memory each time you open and close the dialog. Same thing happens with my product code, the onyl difference is I leak over 50 handles and a couple megs each time, while with the test case I believe it is only 5 or 6 handles and a few K. Over an 8 hour work day, average usage will have these dialogs opened 240-300 times. With a limite of 10k handles... Well, the software will crash between 100-200 dialog openings.
Regardless of whether it is by design or not. To have *ANY* thing leak after closign the dialog and garbage collection is unacceptable.
I notice you mention "dialog". Are you showing a form using its .ShowDialog() method? If so, then the .NET Framework won't explicitly dispose the form when you close it. As a result, any controls on the form, and their corresponding resources, may not be garbage collected.
If this is the case, then you should explicitly call Dispose() on your dialog when you're done with it. This will implicitly dispose all controls (including ours) that appear in the dialog's Controls collection (and any controls in their Controls collection).
If that's not the case, then we'll need to investigate this in more detail.
I already went over all of that in the ticket. The example provided show cases items being leaked. Support response was that this was by design and that my hamdle/memory leak must be something else. I provided screen shots of my application leakign the same objects, just in much higher numbers, I believe there are 56 instances on 1 object in the screen shots provided. Same objects as in the example., just in greater numbers. My manager is refusign to assign any more time to this project and I've had to revert back to non Infragestic controls, like I have had todo multiple times since 2005 on any consumable control (tool window, dialog, etc...).
The uage for the dialogs follow the using pattern, i.e.
using
(type)) {
I'm not sure if this is the same case but a recent memory leak report that I reviewed had a screenshot of a dotTrace output. The majority of the things in the screenshot were AppStyling related objects that are statically stored. These are not memory leaks. As you created and showed multiple instances of a form, those would not increase - it was a one time hit as the application styling metadata for the assemblies were loaded. The other things I saw in that were UltraWinTree classes but the main window that was still displayed contained an UltraTree so that is why those objects were there. Again, perhaps this is a different case but I just double checked the code and the event you mentioned in the initial post is hooked in the ctor of the UltraControlBase (the base class for controls such as UltraButton, UltraListView, etc.) and unhooked in the Dispose method of the UltraControlBase so as long as the Dispose method is called then that method will be unhooked. Can you post the sample project you provided with which you are seeing the issue?
Both ANTS and dotTrace both point out that Infragestics objects are prevents the dialog windows from being fully GCed. You have a sample the show cases the problem, it replicates the problem on my system. Whether you want to believe me or these otehr fine gentleman or not is your perogative. Regardless, until this critical design flaw is fixed, I can not use your product in a production setting nor recommend is use on government contracts. This is really heat breaking as you have the best lookign stuff on the market, it is just a shame it is not functional.
tribbles,
We checked the support case you mentioned and there was no sample provided - only screenshots - so I'm not sure what you mean in your previous posts about the test case leaking window handles. If you can provide that sample (here on the forums or to the support group) then we can look into why you are finding that the controls are not cleaning up properly.