Given that all controls in a WebForm are destroyed (by my understanding) at the end of each postback do you need to “unwire” any event handlers you may have wired up? (Assuming you want to stop handling the events and allow GC)
So for example:
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//Do I need to remove this handler?
btnSubmit.ServerClick += btnSubmit_ServerClick;
}
}
Unlikely. Your
WebForm1instance’s lifetime ends just after the Unload event, if I recall correctly. It’s not as though there is a continuing reference to yourWebForm1class after the page is served and cleanup is done.