I am using the latest RadComboBox for Silverlight 4 and I am finding some memory leaks when I am binding it to my view model.
Here is my RadComboBox declaration:
<telerik:RadComboBox x:Name="rcbGender" ClearSelectionButtonVisibility="Visible" |
ItemsSource="{Binding GenderList, Mode=OneWay}" |
ClearSelectionButtonContent="Clear" SelectedValuePath="Key" DisplayMemberPath="Name" |
SelectedValue="{Binding Gender, Mode=TwoWay}"/> |
The GenderList is a property of the viewmodel:
public IEnumerable<KeyValueDataItem> GenderList |
{ |
get { return _genderList; } |
} |
This is the KeyValueDataItem class
public class KeyValueDataItem |
{ |
private string _key; |
private string _name; |
public KeyValueDataItem(string key, string name) |
{ |
_key = key; |
_name = name; |
} |
public string Name |
{ |
get |
{ |
return _name; |
} |
} |
public string Key |
{ |
get |
{ |
return _key; |
} |
} |
} |
Every time I open and close the page it stays in the memory and does not get clean up by GC. I spent a lot of time debugging it with WinDbg and narrowed it down to the RadComboBox causing this problem. When I removed the radcombobox and replaced it with Windows combobox that fixed the problem. I am using the radcombobox in my application a lot and wouldn't really want to replace it with other controls.
13 Answers, 1 is accepted
Thank you for contacting us.
We are aware of this problem of the RadComboBox control. Unfortunately, this memory leak comes from Silverlight and from the complexity of RadComboBox. We will consider fixing this bug in one of our future releases.
I hope this information helps. I will be glad to assist you further.
George
the Telerik team
We have also noticed this bug, and it is causing problems for us. Can you give any more information as to when a fix might be available?
Thanks.
It entirely depends on when Microsoft will release a version of Silverlight 4, that does not leak. As far as I know this will happen near the end of the summer.
Regards,
Valeri Hristov
the Telerik team
also i have these problem when i use the radComboBox on a userControl.
bug big memory leak after 10 minus my application takes 1000 MB of the Ram.
when it will be fixed?
Why we cannot see the problem on window comboBox?
also when i use datePicker I have memory leak.
best regards.
Thank you for contacting us.
We are aware of this problem with RadComboBox.
However, could you please send us a sample application that reproduces the problem with the memory leak, we will try to help you.
I didn't understand what you mean by "Why we cannot see the problem on window comboBox?". Could you explain, please.
Looking forward for your reply. I will be glad to assist you further.
George
the Telerik team
Regarding the Microsoft issue, it was my understanding they've offered some work arounds.
Is that something that can be applied to this control?
We have heavily used it throughout our application, and cannot wait indefinitely for a resolution. It does not happen with the standard Windows Combo Box, but we really need the virtualization that the Telerik one allows.
Thanks
Kathleen
This memory leak happens when you have content control placed inside of ControlTemplate of another control. The standard Windows ComboBox doesn't have such complexity, but RadComboBox does. This is a memory leak in the Silverlight framework. When Microsoft pronounce the update with the fix, the issue with RadComboBox will not exist anymore.
Sincerely yours,George
the Telerik team
Thanks.
Sergey.
The following forum threads shed some light on the problem:
http://www.telerik.com/community/forums/silverlight/general-discussions/silverlight-4-memory-leaks.aspx
http://www.telerik.com/community/forums/silverlight/combobox/radcombobox-creates-a-memory-leak.aspx
In two words, we are working on a solution for the leaking RadComboBox (and other controls that have popups), hopefuly we will have a fix in this week's internal build.
All the best,
Valeri Hristov
the Telerik team
Do you anticipate doing one this week and if so is there a chance this fix will be in it?
Thanks
We are working on 2010.Q2 Service Pack 2 which include alot of fixes especially memory leaks. We are in testing phase so very soon we will upload the new binaries.
We did not release LIB because the fixes are in the same branch and we have to test the changes.
Thank you for your understanding.
Sincerely yours,
Hristo
the Telerik team
Hi Kartik,
Would you find it possible to isolate this behavior in a small sample project so that I can further troubleshoot and assist you? Also, can you specify which tool are you're using to check for memory leaks? Can you send me a screenshot or profiling session of the memory leak?
Regards,
Dinko
Progress Telerik