Silverlight application memory leaks detector

4 posts, 0 answers
  1. pv Upendran
    pv Upendran avatar
    10 posts
    Member since:
    Sep 2009

    Posted 17 Sep 2009 Link to this post

    Hi,
         How to clear the memory of RadWindow in silverlight and how to avoid the memory leak in silverlight application.
         Anybody can help me?
     
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 18 Sep 2009 Link to this post

    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.
  3. DevCraft banner
  4. pv Upendran
    pv Upendran avatar
    10 posts
    Member since:
    Sep 2009

    Posted 18 Sep 2009 Link to this post

    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.





  5. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 18 Sep 2009 Link to this post

    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.
Back to Top