By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,954 Members | 1,248 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,954 IT Pros & Developers. It's quick & easy.

base.Render(writer) casuse memory leakage

P: n/a
boy
Hi all,
I have created a simple template class as follow, but i encountered memory
leakage on the base.Render(writer). Have all you of encountered the same
problem?
using System;
using System.Web.UI;
public class PageBase : System.Web.UI.Page
{
private string _pageTitle;
public string PageTitle
{
get { return _pageTitle; }
set { _pageTitle = value; }
}

protected override void Render(HtmlTextWriter writer)
{
// First we will build up the html document,
// the head section and the body section.
writer.Write( @"
<html>
<head>
<title>" + PageTitle + @"</title>
</head>
<body>" );

// Then we allow the base class to render the
// controls contained in the ASPX file.
base.Render( writer );

// Finally we render the final tags to close
// the document.
Writer.Write( @"
</body>
</html>" );
}
}
Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.