RadWindowManager memory leak

6 posts, 0 answers
  1. pirobox
    pirobox avatar
    16 posts
    Member since:
    Nov 2009

    Posted 12 Aug 2010 Link to this post

    Sorry to bother, but I've a quite frightening memory leak issue with RadWindowManager.
    Very simple to reproduce. I've simply added a radwindowmanager to a page and client side I create a new window (I'm using google.it as target).
    I've noticed that in IE8 (but it happens less extensively with chrome and firefox) if I continue to create a window and then close it and I look at the memory used by the browser it continues to get bigger.
    I'm using Telerik 2010.2.713.35.

    May you tell me if I can fix this issue someway?

    Here is the code:
    <%@ Page Language="C#" AutoEventWireup="True" %>

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="Rad" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    <script>
    function openwindow()
    {
    var mywindow = radopen("http://www.google.it", null);
    }
    </script>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server"></asp:ScriptManager>
    <div>
    <a href="#" onclick="openwindow();return false;">Open window</a>
    <br />
    <br />
    <Rad:RadWindowManager runat="server" DestroyOnClose="true">
    </Rad:RadWindowManager>
    </div>
    </form>
    </body>
    </html>

    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server"></asp:ScriptManager>
    <div>
    <a href="#" onclick="openwindow();return false;">Open window</a>
    <br />
    <br />
    <Rad:RadWindowManager runat="server" DestroyOnClose="true">
    </Rad:RadWindowManager>
    </div>
    </form>
    </body>
    </html>

    Best regards, Andrea Pirola
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 16 Aug 2010 Link to this post

    Hello Andrea,

    It is expected that the memory consumption is increasing with every opening of a RadWindow - in ASP.NET the memory will be freed only when there is no memory available for the controls. You would get basically the same behavior if you replace RadWindowManager with some standard control.

    We are using tools like sIEve for tracking down memory leaks in our controls and if we find any, we are doing our best to fix them as soon as possible. I checked your scenario with sIEve and it didn't show any problems. If you have a scenario where sIEve or a similar tool reports memory leak with RadWindow, please send us a sample project along with reproduction instructions and the corresponding tool's log and we will check it right away.


    Kind regards,
    Georgi Tunev
    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
  3. pirobox
    pirobox avatar
    16 posts
    Member since:
    Nov 2009

    Posted 17 Aug 2010 Link to this post

    Ok, I admit that at the moment I've not enough skill to deny your arguments.
    So I'm experimenting with sIEve.
    I tried the example I sent you and I'm getting #leaks = 0. What I don't understand is the number of referenced nodes. I mean, why when I close the rad window the dom elements are still referenced by the page? Is not that a problem? I would say yes because biggest is the DOM slower is the page and until the browser is referencing a node, I think, it will not try to garbage collect it , but I wait for your explanation.

    Best regards, Andrea Pirola
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 20 Aug 2010 Link to this post

    Hello again Andrea,

    Note that tools like siEve, Drip, etc. are not perfect - it happens that sometimes they don't catch all leaks and sometimes they cause "false alarms". Unfortunately at this point there is no perfect tool for that purpose and the only thing that we could do is to investigate all reports from such tools about specific leak and if we confirm that it is indeed a problem - to fix it. In addition the tools themselves sometimes cause false reports because of the way the hook to the page. So far, we have been able to track down and fix all confirmed leaks and of course if such appear in the future, they will be fixed as well.


    All the best,
    Georgi Tunev
    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
  5. Yung Yoo
    Yung Yoo avatar
    3 posts
    Member since:
    Aug 2009

    Posted 12 Nov 2010 Link to this post

    I have a same problem...  If I open a radwindow and then close it, the memory usage continuously grows.
    You can reproduce this behavior using your demo page.
     ( http://demos.telerik.com/aspnet-ajax/window/examples/radwindowandmdi/defaultcs.aspx ). 
    If you open all 12 radwindows and close them, <repeat 3 times>, the memory used by IE is over 600MB. Don't try 5 times or more.. your computer will be frozen....  It looks like everyone is being tortured by this problem.
    Let me know...

    http://demos.telerik.com/aspnet-ajax/window/examples/radwindowandmdi/defaultcs.aspx
  6. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 17 Nov 2010 Link to this post

    Hello Yung,

    In that specific demo, RadWindows' objects are not destroyed when the windows are closed (DestroyOnClose=false) which leads to that huge memory consumption - the RadWindows are showing heavy pages with a lot of content so such behavior is expected. As noted before the consumed memory will be freed only when it is needed.
    For convenience I attached a short movie showing the sIEve's test I did with that demo. As you will see, the only memory leak that is reported was coming from one of the pages shown inside a RadWindow and not from the control itself (we will also check that page and clear the leak).

    All the best,
    Georgi Tunev
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top