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

RadTreeView Clear Memory Leak

3 Answers 83 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Thomas Kroll
Top achievements
Rank 1
Thomas Kroll asked on 01 Feb 2010, 06:09 PM
I have an event assigned to events of the RadTreeView with the following statements:
           
Me.RadTreeView1.[AddHandler](Telerik.Windows.Controls.RadTreeViewItem.SelectedEvent, New RoutedEventHandler(AddressOf OnMenuItemClicked)) 
            Me.RadTreeView1.[AddHandler](Telerik.Windows.Controls.RadTreeViewItem.CheckedEvent, New RoutedEventHandler(AddressOf OnCheckedChanged)) 
            Me.RadTreeView1.[AddHandler](Telerik.Windows.Controls.RadTreeViewItem.UncheckedEvent, New RoutedEventHandler(AddressOf OnCheckedChanged)) 

Dynamically, every ~30 seconds, the RadTreeView gets a clear command:

RadTreeView1.Items.Clear() 
and after the clear command is repopulated with ~ 100-150 radtreeviewitems.

Ever since I've added this to my silverlight project, I've experienced a memory leak of around 1-3MB every 30 seconds when this occurs.  What do I need to manually unhook/remove to avoid the memory leak?

Thanks in advance!

Tom

Edit: removing the control fixes the leak problem.
Also: 1-3MB is not constant - it varies and sometimes looks like it is negative but if graphed, is a slow rise of memory usage.

3 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 02 Feb 2010, 07:02 AM
Hi Thomas Kroll,

Unfortunately this is a problem in the Silverlight runtime. Microsoft is aware of it and it will be fixed with SL4.

All the best,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
NS
Top achievements
Rank 1
answered on 18 Mar 2010, 11:01 AM
I also encounter this problem.

I have a Radwindow containing a Hierarchical treeview that is automatically expanded.
There is a checkbox on each level.

Every time the radwindow is opened, and the ItemsSource of the treeview is set I see the memory leak.

Is there any creative workaround to get some sort of control (not the treeview) that would allow to do this ?

Regards,
Nicolas
0
Miroslav
Telerik team
answered on 23 Mar 2010, 01:30 PM
Hello NS,

This is a video of how we demonstrate the unmanaged memory leak:

http://www.screencast.com/users/Vladimir.Milev/folders/Default/media/329026ca-925f-455f-a8dd-70c28e89b550

We cannot be certain that your case is identical. If you suspect that there is a memory leak and you can send us a sample project, we will be happy to investigate it.

Regards,
Miroslav
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.
Tags
TreeView
Asked by
Thomas Kroll
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
NS
Top achievements
Rank 1
Miroslav
Telerik team
Share this question
or