This is a migrated thread and some comments may be shown as answers.

RadDatePicker causes memory leak

8 Answers 140 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Simon Störmer
Top achievements
Rank 1
Simon Störmer asked on 04 Jun 2010, 01:01 PM
Hi,

I think that the RadComboBox is causing a memory leak. I have a very simple test program: my root visual has a button and a content presenter (called Content). Once I hit the button, the following code is executed:

content.Content = new RadDatePicker();  

Once I click the button I would assume that the old datepicker which is then cut off form the visual tree would be garbage collected. But by constantly clicking the button the memory usage increases and even calls to GC.Collect() do not free a byte of memory.

The GCRoot output for any of the datepickers are as follows:

DOMAIN(032C54C0):HANDLE(Pinned):6a612f8:Root:  057b4260(System.Object[])-> 
  047c8e48(System.Collections.Generic.Dictionary`2[[System.IntPtr, mscorlib],[System.Object, mscorlib]])-> 
  057ddcc0(System.Collections.Generic.Dictionary`2+Entry[[System.IntPtr, mscorlib],[System.Object, mscorlib]][])-> 
  04d57054(System.Windows.Controls.Grid)-> 
  04d570b8(System.Collections.Generic.Dictionary`2[[MS.Internal.IManagedPeerBase, System.Windows],[System.Object, mscorlib]])-> 
  04d57104(System.Collections.Generic.Dictionary`2+Entry[[MS.Internal.IManagedPeerBase, System.Windows],[System.Object, mscorlib]][])-> 
  04d57150(Telerik.Windows.Controls.RadCalendar)-> 
  04d57244(MS.Internal.CoreTypeEventHelper)-> 
  04d57450(System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[MS.Internal.CoreTypeEventHelper+EventAndDelegate, System.Windows]])-> 
  04d5749c(System.Collections.Generic.Dictionary`2+Entry[[System.Int32, mscorlib],[MS.Internal.CoreTypeEventHelper+EventAndDelegate, System.Windows]][])-> 
  04d5f250(MS.Internal.CoreTypeEventHelper+EventAndDelegate)-> 
  04d5f218(System.Windows.Input.KeyEventHandler)-> 
  04d50d28(Telerik.Windows.Controls.RadDatePicker)  
 


Maybe I miss-interprete something here. If so, I would be glad to hear how to free the allocated memory.

Thank you,

Tobias Richling.

8 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 08 Jun 2010, 07:26 AM
Hello Tobias Richling,

If you are using Silverlight 4 then this is a problem with the framework.
You can read more information here:
http://forums.silverlight.net/forums/t/171739.aspx

Microsoft is aware of it and is working on updated that will address it.

Greetings,
Hristo
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Mike Shilkov
Top achievements
Rank 1
answered on 02 Jul 2010, 12:02 PM
Hello Hristo.

Why do you think this ,memory leak of RadDatePicker is the consequence of DataTemplate silverlight issue?
When I look at the gcroot output, I see no reference to DataTemplate...

Moreover, if you use DataTemplate inside your controls, there is a workaround to get rid of memory leaks. I've successfully applied it throughout our application.

Please let me know your opinion, as memory leak issue is important for us at the moment.
---
Mike
0
Hristo
Telerik team
answered on 06 Jul 2010, 08:02 AM
Hi Mike Shilkov,

The problem is that this leak is not limited to inline DataTemplates - if you have controls in the template of other controls you will get a memory leak. We have chrome controls in most of our control templates for easier customization and this cause the memory leak.

We are waiting for a new build from Microsoft.

All the best,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Paurav
Top achievements
Rank 1
answered on 01 Sep 2010, 10:28 PM
I'm working with the 4.0.50826.0 service build released today and I'm still seeing a memory leak with RadDatePicker. Please let me know if there is a workaround.
0
Le_Roy
Top achievements
Rank 2
answered on 02 Sep 2010, 09:16 AM
Paurav, As I can suggest, controls should be built against (also updated by Microsoft) Silverlight SDK.
So, lets take a break, and wait for internal build.
0
Hristo
Telerik team
answered on 03 Sep 2010, 01:59 PM
Hello,

Unfortunately Microsoft didn't fix all memory leaks with this new build.
There is another leak - if you have Bindings in an element that is inside Popup control - this control will leak. This is the case with RadComboBox, RadDatePicker and other controls that use Popup.

We are working on a workaround that I hope will resolve this leak but this will affect all our themes.
I'll write back once we are ready.

Sorry for the caused inconvenience.

Kind regards,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Francies
Top achievements
Rank 1
answered on 13 Sep 2013, 04:45 PM
Hello,

One question,  We want to know how to resolve this problem? Maybe we can use a tool that can resolve it. We hope could have a response about that problem. If you know something about it please write me an e-mail because it's important for our project.

Thanks a lot.

Francies Fuentes.
0
Vladi
Telerik team
answered on 18 Sep 2013, 11:57 AM
Hi,

As this thread is couple of years old we are not aware of any existing memory leaks in the current version of the RadDatePicker control.

If you can open a support thread and send as a sample project that reproduces a possible memory leak it would be of great help in determining if a possible memory leak is related to the control. Also you can use our JustTrace product to test the specific scenario on your side.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
DatePicker
Asked by
Simon Störmer
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Mike Shilkov
Top achievements
Rank 1
Paurav
Top achievements
Rank 1
Le_Roy
Top achievements
Rank 2
Francies
Top achievements
Rank 1
Vladi
Telerik team
Share this question
or