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.
Unfortunately, activation email could not send to your email. Please try again.

Seems like ComboBoxAdv severelly leaks resources

Thread ID:

Created:

Updated:

Platform:

Replies:

59473 Apr 13,2007 10:12 AM Apr 17,2007 01:56 PM Windows Forms 2
loading
Tags: Tools
Boris Kartamyshev
Asked On April 13, 2007 10:12 AM

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

Golda Rebecal [Syncfusion]
Replied On April 16, 2007 10:13 AM

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

Boris Kartamyshev
Replied On April 17, 2007 01:56 PM

Thank you.

I will try that version.

Boris Kartamyshev.

CONFIRMATION

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.

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.

;