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. Image for the cookie policy date

Seems like ComboBoxAdv severelly leaks resources

Hi,

I am attaching sample with 3 forms.
1st is the main one with 3 buttons - "No Leak Form", "Leaking Form" and "GC"
2nd is empty form
3rd is form with three ComboBoxAdv control (library version 4.2.0.37)

How to reproduce:
1. Start Task Manager, make sure that columns showing GDI and USER objects count are visible.
2. Start Attached application.
3. After it started hit GC button. Take note of GDI and USER objects count in task manager
4. Hit "No Leak Form" button. 5 forms will appear, take note of GDI/USER objects count (it should go up) in task manager.
5. Close all 5 forms (not main one).
6. Hit GC button. Take note of GDI/USER objects count int task manager (should be either the same or almost the same as count in step 3).
7. Hit "Leaking Form" button. 5 forms with 3 ComboBoxAdv will appear. Take note of GDI/USER objects count.
8. Close all 5 forms (not main one).
9. Hit GC button. Take note of GDI/USER objects count int task manager). At this point you can observe that GDI/USER objects count is almost unchanged from step 7. Thus I believe ComboBoxAdv is leaking.

If you will repeat steps 7-9 gdi/user objects count will keep growing and if form is complex with numerous ComboBoxAdvs and form is opened/closed frequently it is possible by the end of day to receive GDI+ general exception or exception loading images when handles count reaches extreme levels.

Using tool from http://msdn.microsoft.com/msdnmag/issues/03/01/GDILeaks/ it appears that Default WinForms icon for form is being not disposed and .Net Memory Profiler from http://memprofiler.com/ seems to confirm that (there are icons not being disposed), although forms and comboboxes are disposed properly.

I hope you can provide me with solution to this.

Looking further it seems that ComboBoxAdv creates popup control for the drop down list and that brings me to another question. Why in the hell ComboBoxAdv creates popup container in construction. Same story but more severe one with DateTimePickerAdv - it creates !!! GRID !!! at startup, I understand that you guys use it to show calender (easily customizable one), but I believe this is poor implementation to create popup which might not be even opened in constructor.

Why not use lazy loading in both cases? Users might not even see that popup, but you guys still impose penalty at startup time of even small forms .

So main question here is: Is ComboBoxAdv leaking resources?

Regards,
Boris Kartamyshev.

ComboBoxAdvLeakTest.zip

2 Replies

GR Golda Rebecal Syncfusion Team April 16, 2007 02:13 PM UTC

Hi kbv,

Thanks for the sample and reproducing steps provided.

I am able to reproduce the issue of GDI objects not being disposed properly when ComboBoxAdv is used in v4.2.0.37. I checked the issue in v4.4 and found that the issue is not there. I have attached a video file that shows what I could see at my end in v4.4.

Could you please consider upgrading to this version? If so, you can download it from the following location:

http://www2.syncfusion.com/Installs/v4.4.0.51/SyncfusionEssentialStudioSetup.exe

Unlock Key : Please contact our sales team ( salessupport@syncfusion.com )

Thanks for your interest in Syncfusion products.

ComboBoxAdv

Best Regards,
Golda


BK Boris Kartamyshev April 17, 2007 05:56 PM UTC

Thank you.

I will try that version.

Boris Kartamyshev.

Loader.
Live Chat Icon For mobile
Up arrow icon