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

Small memory leak with attributes

1 Answer 59 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Caesar
Top achievements
Rank 1
Caesar asked on 29 Jun 2011, 12:31 PM
Hi,

When setting custom attributes server-side, it seems like IE9 leaks some memory when posting an updatepanel.

Sample:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="menumem.aspx.vb" Inherits="WebApplication4.menumem" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ccc" runat="server">
    </telerik:RadScriptManager>
    <div>
        <asp:UpdatePanel ID="up" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Button ID="aa" runat="server" Text="Hit me multiple times" />
                <telerik:RadMenu ID="rm" runat="server">
                    <Items>
                        <telerik:RadMenuItem Text="Test">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Test">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Test">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Test">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Test">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Test">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenu>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>

Code behind:
Public Class menumem
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        For Each rmi As Telerik.Web.UI.RadMenuItem In rm.Items
            rmi.Attributes("test") = New String("c"c, 200000)
        Next
    End Sub
 
End Class

I have increased the size of the attribute that is set just to make the memory leak more obvious.
Each button click in this sample seems to leaks some memory, at least in IE9-mode!

In our real world application, we do notice this memory leak since we have a top menu that is always updated with updatepanel. The entire application (page) is very rarely reloaded in our application.

Regards
Caesar

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 05 Jul 2011, 07:24 AM
Hello Caesar,

Thank you for  this observation. We will research it and log it for fixing.

All the best,
Plamen Zdravkov
the Telerik team

Browse the vast support resources we have to jump start 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.

Tags
Menu
Asked by
Caesar
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or