Dispose warning i Central Admin
During the hunt for a dispose warning in my code, I changed som logging
settings in Central Admin. I was given a warning about a non-disposed object
for microsoft code.
Following is the stack trace:
An SPRequest object was not disposed before the end of this thread.
To avoid wasting system resources, dispose of this object or its parent
(such as an SPSite or SPWeb) as soon as you are done using it.
This object will now be disposed. Allocation Id:
{6816F2BE-6513-46EF-9912-B11B03C251C6} This SPRequest was allocated at
at Microsoft.SharePoint.Library.SPRequest..ctor()
at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(Boolean
bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[]
UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean
bAsAnonymous)
at Microsoft.SharePoint.SPWeb.InitializeSPRequest()
at Microsoft.SharePoint.SPWeb.EnsureSPRequest()
at Microsoft.SharePoint.SPWeb.get_Request()
at Microsoft.SharePoint.SPListItemCollection.EnsureListItemsData()
at Microsoft.SharePoint.SPListItemCollection.Undirty()
at
Microsoft.SharePoint.SPBaseCollection.System.Collections.IEnumerable.GetEnumerator()
at
Microsoft.SharePoint.Administration.SPAdministrationWebApplication.RemoveAdministrativeTask(String systemId)
at Microsoft.SharePoint.ApplicationPages.MetricsPage.BtnSave_Click(Object
sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP._admin_metrics_aspx.ProcessRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception
error)
at
System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
date: Fri, 4 Jul 2008 03:08:00 -0700
author: Christopher am