leak memory on Radwindow

17 posts, 0 answers
  1. Jamal Husien
    Jamal Husien avatar
    43 posts
    Member since:
    Feb 2010

    Posted 10 Aug 2010 Link to this post

    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.

  2. Jamal Husien
    Jamal Husien avatar
    43 posts
    Member since:
    Feb 2010

    Posted 11 Aug 2010 Link to this post

    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.
  3. DevCraft banner
  4. Jamal Husien
    Jamal Husien avatar
    43 posts
    Member since:
    Feb 2010

    Posted 11 Aug 2010 Link to this post

    Hello
    also when a usercontrol have  RadDatePicker the i have leak memory.


     
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 13 Aug 2010 Link to this post

    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
  6. Jamal Husien
    Jamal Husien avatar
    43 posts
    Member since:
    Feb 2010

    Posted 13 Aug 2010 Link to this post

    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.






    .
  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 18 Aug 2010 Link to this post

    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
  8. Le_Roy
    Le_Roy avatar
    31 posts
    Member since:
    Nov 2009

    Posted 02 Sep 2010 Link to this post

    Microsoft released update for Silverlight. So lets wait for updated controls..
    I hope everything will be OK!
  9. Egemen
    Egemen avatar
    34 posts
    Member since:
    Apr 2012

    Posted 28 May 2013 Link to this post

    Hi,

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

  10. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 29 May 2013 Link to this post

    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.

  11. Egemen
    Egemen avatar
    34 posts
    Member since:
    Apr 2012

    Posted 29 May 2013 Link to this post

    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


  12. Egemen
    Egemen avatar
    34 posts
    Member since:
    Apr 2012

    Posted 29 May 2013 Link to this post

    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.

  13. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 29 May 2013 Link to this post

    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.

  14. Egemen
    Egemen avatar
    34 posts
    Member since:
    Apr 2012

    Posted 29 May 2013 Link to this post

    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!


  15. Egemen
    Egemen avatar
    34 posts
    Member since:
    Apr 2012

    Posted 29 May 2013 Link to this post

    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
  16. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 31 May 2013 Link to this post

    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.

  17. Egemen
    Egemen avatar
    34 posts
    Member since:
    Apr 2012

    Posted 01 Jun 2013 Link to this post

    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...
  18. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 05 Jun 2013 Link to this post

    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.

Back to Top
DevCraft banner