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

leak memory on Radwindow

16 Answers 191 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jamal Husien
Top achievements
Rank 1
Jamal Husien asked on 11 Aug 2010, 02:45 AM
Dear all,
I use radwindow on my silverlight application to show data from the users.
i use these code to create new windows.

 

OnClick...
{

RadWindow RadWindow_tmp = new RadWindow ();
RadWindow_tmp.Show();
Object RadWindow_tmp_Content = new Object();
RadWindow_tmp_Content = new uc_Employee("test", 7);
RadWindow_tmp.Content = RadWindow_tmp_Content;

RadWindow_tmp_Content =null;//no need for these line

}

 

when i close the window
i make the following
i make ( before GC.Collect();)

RadWindow MainRadWindow = RadWindow.GetParentRadWindow(this);        
(MainRadWindow.Content as uc_Employee).DataContext = null;
 MainRadWindow.Content = null;

alos i call "GC" (alos i use a timer to call it)

GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();

 

I also use WeakReference to see is the control and the radwindow isAlive.

after i close the window the radwindow is not on the memory
but the control "uc_Employee" still on the memory

on these case after several time the user open new radwindow the application also the computer crash.
please i need some help how i can release the control from the memory.
Is these bug on silverlight4. how i can solve the till we get SL5.

best regards.

16 Answers, 1 is accepted

Sort by
0
Jamal Husien
Top achievements
Rank 1
answered on 11 Aug 2010, 11:45 PM
note
1. when i have radcombobox on my control, the "cantrol" on the radwindow will not be collected by the CB.
 I think there are also many thing that make the memory leak.
please give me help.
what i need to do on this case 
and what i need to do for the RadComboBox i try to set  is to null before closing the window but these not help.

best regards.
0
Jamal Husien
Top achievements
Rank 1
answered on 11 Aug 2010, 11:51 PM
Hello
also when a usercontrol have  RadDatePicker the i have leak memory.


 
0
Miroslav Nedyalkov
Telerik team
answered on 13 Aug 2010, 01:24 PM
Hi Jamal,

Could you please open a support ticket and provide us a sample project that reproduces the problem? This would help us investigate what causes the leak and find a solution.

I just would like to let you know that there is a memory leak in the Thumb control which we use in the RadWindow control and this problem should be solved soon, because Microsoft are currently working on it.

Best wishes,
Miroslav Nedyalkov
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
0
Jamal Husien
Top achievements
Rank 1
answered on 13 Aug 2010, 08:41 PM

Dear Telerik
really I don’t feel good from Telerik, I explain the problem very well, i lost a lot of time, and this is your QA responsibility to create demo project and not me.

simple examle: make button that make only the following and then you can see that you have memory leak

RadWindow.Alert("HI HI") make memory leak

main problem As I explain before
on the main page i create dynamically radwindow that include control ( see the code that I write it before)
when the control

 

 

include radcombo or RadDatePicker and maybe other controls I have leak memory.
when I close the window all the radwindow stay on the memory.

I can said know
1.radcombo is not good (i cannot use it)
2.RadDatePicker also make memory leak i cannot use it.
3.the editor not include tables and rtl i cannot use it.
4.radwind include memory leak i cannot use it.
5.menu include bug for RTl i cannot use it.

I know that Microsoft have critical bug, but if think telerik can find solution for
radcombo and RadDatePicker.

http://www.telerik.com/community/forums/silverlight/combobox/radcombobox-causes-memory-leak.aspx

really i feel so bad, i think i make big mistake when i chose telerik + silver light ,if i chose flex i donor have all these problems.

i am realy sory but the true is silverlight is so bad.

 

 


best regards.






.
0
Miroslav Nedyalkov
Telerik team
answered on 18 Aug 2010, 11:26 AM
Hi Jamal,

Please find the attached project that demonstrates the memory leak we are aware of - this problem will be fixed with the next build (version) of Silverlight. I am afraid there is nothing we can do to address the issue on our side.
I also reproduced the issue in a similar test project with the DateTimePicker without a RadWindow control. I also confirm that there is memory leaks in the ComboBox which we will target as soon as MS releases the improved Silverlight build. 

Sincerely yours,
Miroslav Nedyalkov
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
0
Le_Roy
Top achievements
Rank 2
answered on 02 Sep 2010, 09:27 AM
Microsoft released update for Silverlight. So lets wait for updated controls..
I hope everything will be OK!
0
Egemen
Top achievements
Rank 1
answered on 28 May 2013, 10:59 AM
Hi,

I'am actually using the latest version of Telerik and Silverlight. When i run this application, this problem is not resolved yet!

0
Miroslav Nedyalkov
Telerik team
answered on 29 May 2013, 10:46 AM
Hi Egemen,

I tried the project attached and it seems to work fine with the current version of RadControls for Silverlight. Could you please tell us what version of RadControls for Silverlight do you use? Could you also share with us what steps do you perform to reproduce the problem and how do you observe it?

All the best,
Miroslav Nedyalkov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Egemen
Top achievements
Rank 1
answered on 29 May 2013, 01:15 PM
Hi,

I have installed the latest  version of Telerik silverligth. version v.2013.1.403.1050 and my silverlight version is  5.1.20125.0  64 bit.
When i run this sample application and when i click the open button and i close the radwindow, it is alive....

Thank you


0
Egemen
Top achievements
Rank 1
answered on 29 May 2013, 03:15 PM
Hi,

I'm actually developing an silverlight application in which the user will do some modifications by using the radwindow. The user can manipulate one radwindow at the same time but he can open and close this window several times . And i think there is a memory leak.
I have added an usercontrol in this project and when i open and close radwindow several times and the memory usage will grow up dramatically as you see. Can you tell me how i can resolve this issue?

Best regards.

0
Miroslav Nedyalkov
Telerik team
answered on 29 May 2013, 03:31 PM
Hi Egemen,

I created a video demonstrating what I do and the example itself. I took a look at your screenshot and I think you are not pressing the Clean up button and this is the reason why the window is not collected. Please noticed that Silverlight doesn't run the GC exactly when an object is not needed anymore. For more information about how the Silverlight GC works, please refer to this article.

Hope this helps.

Regards,
Miroslav Nedyalkov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Egemen
Top achievements
Rank 1
answered on 29 May 2013, 03:54 PM
Thank you for this video.It's right. I thought that when i close the radwindow, Garbage Collector remove this instance from memory.
I'm a new in Silverlight development.  My question is stupid but when i have to call 
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect(); ?  I try to call in RadWindow Close event but it doesn't work!


0
Egemen
Top achievements
Rank 1
answered on 29 May 2013, 04:16 PM
Hi,

if you set an usercontrol like this =>  reference = new WeakReference(w = new RadWindow() { Content = new SampleUserCtrl() });
and you click clean up button , radwindow is alive. I'm missing something?

Best regards
0
Miroslav Nedyalkov
Telerik team
answered on 31 May 2013, 02:14 PM
Hello Egemen,

The GC in Silverlight cannot be activated synchronously. This means that you cannot be sure that your object will be freed immediately after you call GC.Collect.

Regards,
Miroslav Nedyalkov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Egemen
Top achievements
Rank 1
answered on 01 Jun 2013, 04:24 PM
Hi,

I'm okay with you. When i set the Content null, it works. Weak refence is not alive . My application use a radradiagram in which there are several custom shapes and when the user click on the shape, i open (menu) radwindow. After opening/closing them several times increases iexplorer.exe process memory in Task Manager.  In the user control, there are nothing. Just an user control but iexplorer.exe process  continue to grow up... I dont know if i can use context menu because i'd like that the menu is open when the user click on menu item...
0
Miroslav Nedyalkov
Telerik team
answered on 05 Jun 2013, 02:15 PM
Hi Egemen,

You should not track memory issues using the memory usage of the process when we are talking about managed applications (like Silverlight ones) as the usually take more memory than they need which is used to optimize the memory management. If you want to test for memory issues I would suggest you to use a memory profiler like JustTrace.

Hope this helps.

Regards,
Miroslav Nedyalkov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Window
Asked by
Jamal Husien
Top achievements
Rank 1
Answers by
Jamal Husien
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Le_Roy
Top achievements
Rank 2
Egemen
Top achievements
Rank 1
Share this question
or