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

Silverlight application memory leaks detector

3 Answers 184 Views
Window
This is a migrated thread and some comments may be shown as answers.
pv Upendran
Top achievements
Rank 1
pv Upendran asked on 17 Sep 2009, 06:01 AM
Hi,
     How to clear the memory of RadWindow in silverlight and how to avoid the memory leak in silverlight application.
     Anybody can help me?
 

3 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 18 Sep 2009, 10:34 AM
Hello pv Upendran,

If you don't have any references to the RadWindow control your application shouldn't "leak" RadWindow controls. The memory used by the RadWindow control should be cleaned by the Silverlight garbage collection.

Regards,
Miroslav Nedyalkov
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
pv Upendran
Top achievements
Rank 1
answered on 18 Sep 2009, 12:02 PM
Please can you explain when and where the garbage collection takes place for telerik controls. Actually we have an inbuilt framework for coding where we use radtab control mostly. once i close  the  tabs opened, the memory is not reduced utilized by the open tab which is now closed is not reduced.The same happens with my rad window.

Note:- Radwindow and  tabs are added dynamically.

i) Please can you suggest me , that if it is possible to clear my memory issue with one common functionality?
                                                                                (or)
ii) Can it be invoked explicitly.

Thanks in Advance.





0
Miroslav
Telerik team
answered on 18 Sep 2009, 01:07 PM
Hi pv Upendran,

Debugging memory leaks is often not trivial, but there are ways to do so.

If you think that an object should be collected, you can always force garbage collection by calling the

GC

 

.Collect();

 

Then, there should be no "strong" references to the control you want to dispose of. If you suspect that a part of your application may be leaking, you can use tools like WinDbg to check whether an object is still in memory and if it is, what references are keeping it there.

Generally, you should not keep strong references of controls in your ViewModel. You can always use WeakReference fields that are wrapped in a typed property.

We are not aware of a memory leak in the TabControl, but we will be happy to investigate if you want.

All the best,
Miroslav
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.
Tags
Window
Asked by
pv Upendran
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
pv Upendran
Top achievements
Rank 1
Miroslav
Telerik team
Share this question
or