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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Leak in themed control

Thread ID:

Created:

Updated:

Platform:

Replies:

18044 Aug 23,2004 03:45 PM UTC Aug 24,2004 10:28 AM UTC WinForms 8
loading
Tags: Tools
Sam
Asked On August 23, 2004 03:45 PM UTC

When using DateTimePickerExt and TabControlExt, I can see the ThemedDrawing and ThemedComboBoxDrawing being registered through ThemedControlDrawing into XPThemes by using XPThemes.RegisterControlDrawing method. However, I wonder if XPThemes.UnregisterControlDrawing method is ever called, because I can see instances ThemedDrawing and ThemedComboBoxDrawing still hanging around in the heap and just keep adding up when the form is opened and closed. It happens on a form that will be opened and closed for tens of times by the user during one session, so this unreleased memory has become a problem. What is the easiest way to tell XPThemes to release the objects? Thanks, Sam

Sean Greer
Replied On August 23, 2004 04:40 PM UTC

Can you repro this with a small sample? I thought I saw a problem with the DateTimePickerAdv as well, but when I attempted to create a small sample I could not repro it. I have found other items that are interesting: if you remove a tab page from the TabControlAdv and do not dispose it, your form will stick around in memory. I''d guess that this is true for any control that is bound and has eventhandlers registered. Personally, I think Microsoft should include a tool comparable to SciTech''s memory profiler with VS. I was shocked at the number of instances in which a non-disposed control was preventing collection of a large form. Sean

Administrator [Syncfusion]
Replied On August 23, 2004 04:55 PM UTC

Sean, Thanks for the reply. I am using SciTech Profiler to see those instance and it is a very useful tool. The test app should be very easy to create. This will become a very long email if I attach the code. However, it is very simple to reproduce: Form1 has one button that will launch Form2. Form1 is the Startup Form. Form2 has DateTimePickerExt and TabControlExt with couple of TabPageExt in it. Compile the project and Use SciTech MF to launch it. When Form1 is shown, take a heap snapshot. Then click on the button in Form1 to launch Form2. Close Form2 and take another heap snapshot. Look at how many new instances of ThemedTabDrawing, ThemedComboboxDrawing, etc that remains undisposed and held by XPThemes. Whenever you launch Form2, you can see the instance added. Can we use XPThemes.UnregisterControlDrawing method to unregister those ThemedDrawing objects and how can we get the instance of those objects to pass into the method? Thanks, Sam

Sean Greer
Replied On August 23, 2004 05:27 PM UTC

Sam, I used the attached test app and could not repro the issue. Form1 opens Form2 which has a TabControlAdv with 4 tab pages. There are 2 DateTimePickerAdvs and all controls have themes enabled. I''m not seeing the lingering objects in memory. Can you post the code (zipped) that you''re using? Sean WindowsApplication74_7285.zip

Administrator [Syncfusion]
Replied On August 23, 2004 06:48 PM UTC

Sean, Looks like we are talking about the same control here. I am using TabControlExt and DateTimePickerExt, not the Adv ones. I am nore sure if I have the Adv ones. What are the difference? Even the description in your webpage is confusing. The title says DateTimePickerAdv, but the content keeps refering to DateTimePickerExt. http://www.syncfusion.com/products/tools/features/tools_feat_14.aspx Sam

Administrator [Syncfusion]
Replied On August 23, 2004 06:49 PM UTC

Sean, I am sorry. I mean "We are not talking about the same control here...." in my previous post. Sam

Sean Greer
Replied On August 23, 2004 07:19 PM UTC

Sorry Sam, I should make it clear that I am not a Syncfusion employee, just a consumer of their products. I''m particulary interested in these memory issues because I''ve spent quite a bit of time tracking them down in my app after client reported problems. There is no difference between the DateTimePickerAdv and DateTimePickerExt. The control used to be called DateTimePickerExt but has been renamed to conform to the naming standards of the Essential Suite. Sean

Administrator [Syncfusion]
Replied On August 23, 2004 07:30 PM UTC

I am sorry. I thought you work for Syncfusion. :) My bad. So, you are saying that I should be using the Adv, instead of Ext ones? Thanks very much for all your help. Sam

Administrator [Syncfusion]
Replied On August 24, 2004 10:28 AM UTC

Hi, Thanks a lot for your updates, Sean. The TabControlAdv and DateTimePickerAdv controls in v2.0 are basically the same controls as TabControlExt and DateTimePickerExt in v1.6. Their names were changed according to v2.0 naming conventions. We have made several memory leak related fixes in our v2.0 releases, and we recommend you to test for this issue using our latest release. Please create an incident in Direct-Trac in this regard, and I will update you with the download instructions for our latest release. We appreciate your cooperation, and thanks for your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

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.

Warning Icon 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.Close Icon

;