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

Memory Leak? Not disposing self or content

4 Answers 125 Views
Window
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 23 Jul 2010, 01:28 AM
v.2010.1.603.1040 [Installation Folder]


I had noticed recently my rad windows where not disposing (my page uses aprox 10mb of memory on a win7 x64 )

So i tried doing a whole lot of things to see why the GC wasn't collecting
In the end, I have a button doing just this
(Button click calls this method)

public void NewWindow() {
            RadWindow radWindow = new RadWindow();
            radWindow = new RadWindow();
            GC.Collect();
            radWindow.Show();
        }


Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8



I start off at about 100mb usage with fire fox, I click it about 10-20 times (Adds about 1-3mb per addition) So total usage sits around the 120mb
Then I close all the windows. (Memory goes down by about 1mb when I close the first window, but then it increases by about 0.1-0.2 mb for each subsequent window I close after that) (i.e. 120 -> 119 -> 119.1 -> 119.2 .... -> 122)
Then I click to add a new window (to invoke GC.Collect()) And memory usage is still sitting on 122 + 1-3mb from the last window





This becomes more of an issue when I Put content in the window (Page usage ~ 10mb) as it is not disposing the content either


Full method is:
public void NewCashSalePage() {
            RadWindow radWindow = new RadWindow();
            radWindow = new RadWindow();
            radWindow.Header = "Header";
 
            radWindow.DataContext = cashSaleDomainDataSource;
 
            CashSale_Page cashSale_Page = new CashSale_Page(this);
 
            radWindow.Content = cashSale_Page;
 
            radWindow.MinWidth = cashSale_Page.MinWidth + Values.RadWindowBorderWidth;
            radWindow.MinHeight = cashSale_Page.MinHeight + Values.RadWindowBorderHeight;
 
            radWindow.Width = cashSale_Page.MinWidth + Values.RadWindowBorderWidth;
            radWindow.Height = cashSale_Page.MinHeight + Values.RadWindowBorderHeight;
 
 
 
            radWindow.Show();
            radWindow.PreviewClosed += new System.EventHandler<WindowPreviewClosedEventArgs>(Window_PreviewClosed);
        }

4 Answers, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 28 Jul 2010, 08:48 AM
Hi Alexander,

Thank you for contacting us.

After a thorough investigation we have found that the memory leak is caused by a bug in the Silverlight framework. The issue will be resolved with the release of the newest version of Silverlight. You can keep track at http://www.silverlight.net/.
Sorry for the caused inconvenience.

If you have any other questions please feel free to contact us again.

All the best,
Konstantina
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
hwsoderlund
Top achievements
Rank 1
answered on 28 Jul 2010, 09:20 AM
Have you actually received confirmation from the Silverlight team that it will be fixed in the next version? If so, does this mean the next major version (Silverlight 5), or will it be fixed already in Silverlight 4?
0
Konstantina
Telerik team
answered on 28 Jul 2010, 12:35 PM
Hi hwsoderlund,

Thank you for your reply.

We have tight relationships with Microsoft, so we receive the builds before they are officially announced. We have already tested this issue with the newest build, and the problem doesn't persist. I am refering to the next build for SL4, not the major version (SL5). So, keep track when it is going to be released and after upgrading the issue should disappear.

Hope this information helps. If you have any other inquiries please let us know.

Greetings,
Konstantina
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
hwsoderlund
Top achievements
Rank 1
answered on 28 Jul 2010, 02:18 PM
Great news! Thank you.
Tags
Window
Asked by
Alex
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
hwsoderlund
Top achievements
Rank 1
Share this question
or