Hi,
In my C# code, I have a method defined but not called any where as I am not using the functionality.But when I run SPDIsposerCheck in my code , the tool identified below mentioned method with error "Disposable type not disposed".
SO will this error message affects the performance as the below method is no where used in my code ?
public string GetServer(string siteurl)
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
// Retrieve a site collection by URL.
using (SPSite site = new SPSite(siteurl))
{
SPWeb spweb = site.RootWeb;
});
}
Knowledge is power.