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

Memory Leak in GridView RowDetails?

5 Answers 100 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Konrad
Top achievements
Rank 1
Konrad asked on 05 Dec 2012, 04:41 PM
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.

5 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 06 Dec 2012, 08:16 AM
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.

0
Konrad
Top achievements
Rank 1
answered on 06 Dec 2012, 02:25 PM
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.
0
Nedyalko Nikolov
Telerik team
answered on 10 Dec 2012, 03:35 PM
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.

0
Josh
Top achievements
Rank 1
answered on 11 Feb 2013, 08:49 PM
Was the cause of this ever identified? 
0
Vlad
Telerik team
answered on 12 Feb 2013, 07:02 AM
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.

Tags
GridView
Asked by
Konrad
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Konrad
Top achievements
Rank 1
Josh
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or