Memory Leak in GridView RowDetails?

6 posts, 0 answers
  1. Konrad
    Konrad avatar
    6 posts
    Member since:
    May 2011

    Posted 05 Dec 2012 Link to this post

    Hello,

    I got a problem with the RowDetails of a GridView.
    When I view the RowDetails of a row an scroll up and down the GridView, so the RowDetails go of visible area. The Unload Event of the RowDetails will be Riesed. Next time the RowDetails come back to the visible area a new RowDetails object will be loaded. But the Memory of the old RowDetails obejct will not de relaesed. So the application allocates more and more memory until the Application crashes.
    Is there a way to avoid a Memory Leak by using RowDetailsTemplate.

    I use the Silverlight Controls: 2012.2 912

    Thanks in advance.
  2. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 06 Dec 2012 Link to this post

    Hi,

    Try to release resources used in RowDetails on RowDetails unloaded event. Most probably there is an event handler which holds a reference to an object inside RowDetails (which prevents Garbage collector to do its job).

    Regards,
    Nedyalko Nikolov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Konrad
    Konrad avatar
    6 posts
    Member since:
    May 2011

    Posted 06 Dec 2012 Link to this post

    Hello Nedyalko,

    there are no event handler which holds references to obejcts.

    The Next Step i have tested it with an empty UserControl as RowDetailsTemplate. The destructor of the UserControl is called when the GridView is scrolling up and down. Thats ok. But when I add a GridView control to the UserControl(RowDetailsTempalte), the destructor is no longer called. I tested it with and without ItemsSource binding to the inner GridView.
    What can i do?
    I also test it with the last internal Build with no effect.

    Thanks in advance.
  4. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 10 Dec 2012 Link to this post

    Hello,

    Thank you for the sample project.
    I'll take a look and will notify you via official support channel.

    All the best,
    Nedyalko Nikolov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Josh
    Josh avatar
    27 posts
    Member since:
    Feb 2012

    Posted 11 Feb 2013 Link to this post

    Was the cause of this ever identified? 
  6. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 12 Feb 2013 Link to this post

    Hello,

     The cause was identified and the leak was fixed immediately. You can get our latest build from your account - the official Q1 2013 release will be next week. 

    Kind regards,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top