Hi,
We are using RadSearchBox on one of our ASP.NET WebForms application pages and have noticed browser memory leaks running in IE8 (using
sIEve to detect the memory leaks).
It appears that leaks occur when SearchContextItems are added to the RadSearchBox.
I have created a sample app that demonstrates the leaks. The sample app is built in VS2012 .NET 4.0 using Telerik RadControls for Ajax Q3 2013 v 2013.3.1114.40.
Attached is screenshot of sIEve results. Memory usage in red is when I reloaded the page (ie, click Go button). Memory usage in green is when I unloaded the page (ie, clicking about:blank).
It is likely that upgrading to a newer browser would correct the leaks, but unfortunately, we're mandated by corporate IT to use IE8 and have no choice for upgrading the browser (Chrome and Firefox are not an option either).
Thanks in advance for any assistance you can provide.
Source Code:
default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebApplication4._default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>RadSearchBox Leak</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
</Scripts>
</asp:ScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" UpdatePanelsRenderMode="Inline"/>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" />
<telerik:RadSearchBox ID="uxRadSearchBox" runat="server" DropDownSettings-Width="80px" DropDownSettings-Height="50px" Width="360px" EnableAutoComplete="false">
<SearchContext ShowDefaultItem="false">
</SearchContext>
</telerik:RadSearchBox>
</form>
</body>
</html>
default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication4
{
public partial class _default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
Telerik.Web.UI.SearchContextItem item = null;
string context = String.Empty;
for (int i = 0; i < 3; i++)
{
context = "Context" + i.ToString();
item = new Telerik.Web.UI.SearchContextItem(context, context);
// LEAK: Browser leak on the following line
this.uxRadSearchBox.SearchContext.Items.Add(item);
}
}
}
}
}
-ScottP
We are using RadSearchBox on one of our ASP.NET WebForms application pages and have noticed browser memory leaks running in IE8 (using
sIEve to detect the memory leaks).
It appears that leaks occur when SearchContextItems are added to the RadSearchBox.
I have created a sample app that demonstrates the leaks. The sample app is built in VS2012 .NET 4.0 using Telerik RadControls for Ajax Q3 2013 v 2013.3.1114.40.
Attached is screenshot of sIEve results. Memory usage in red is when I reloaded the page (ie, click Go button). Memory usage in green is when I unloaded the page (ie, clicking about:blank).
It is likely that upgrading to a newer browser would correct the leaks, but unfortunately, we're mandated by corporate IT to use IE8 and have no choice for upgrading the browser (Chrome and Firefox are not an option either).
Thanks in advance for any assistance you can provide.
Source Code:
default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebApplication4._default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>RadSearchBox Leak</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
</Scripts>
</asp:ScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" UpdatePanelsRenderMode="Inline"/>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" />
<telerik:RadSearchBox ID="uxRadSearchBox" runat="server" DropDownSettings-Width="80px" DropDownSettings-Height="50px" Width="360px" EnableAutoComplete="false">
<SearchContext ShowDefaultItem="false">
</SearchContext>
</telerik:RadSearchBox>
</form>
</body>
</html>
default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication4
{
public partial class _default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
Telerik.Web.UI.SearchContextItem item = null;
string context = String.Empty;
for (int i = 0; i < 3; i++)
{
context = "Context" + i.ToString();
item = new Telerik.Web.UI.SearchContextItem(context, context);
// LEAK: Browser leak on the following line
this.uxRadSearchBox.SearchContext.Items.Add(item);
}
}
}
}
}
-ScottP