RadDatePicker causes memory leak

9 posts, 0 answers
  1. Simon Störmer
    Simon Störmer avatar
    31 posts
    Member since:
    Oct 2012

    Posted 04 Jun 2010 Link to this post

    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.
  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 08 Jun 2010 Link to this post

    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.
  3. DevCraft banner
  4. Mike Shilkov
    Mike Shilkov avatar
    30 posts
    Member since:
    Apr 2010

    Posted 02 Jul 2010 Link to this post

    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
  5. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 06 Jul 2010 Link to this post

    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
  6. Paurav
    Paurav avatar
    7 posts
    Member since:
    Aug 2010

    Posted 01 Sep 2010 Link to this post

    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.
  7. Le_Roy
    Le_Roy avatar
    31 posts
    Member since:
    Nov 2009

    Posted 02 Sep 2010 Link to this post

    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.
  8. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 03 Sep 2010 Link to this post

    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
  9. Francies
    Francies avatar
    1 posts
    Member since:
    Sep 2013

    Posted 13 Sep 2013 Link to this post

    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.
  10. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 18 Sep 2013 Link to this post

    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 >>
Back to Top
DevCraft banner