I am just wondering how to find out a memory leak in a code. I am working on a code written by someone else and been told that it has a memory leak. I am going through the code to see if it has a memory leak.
does following code has memory leak. do i need to close the SPWEB objects here.
private bool isSubSite()
{
SPWeb currWeb = SPContext.Current.Web;
SPWeb rootWeb = currWeb.Site.RootWeb;
if (currWeb.ID != rootWeb.ID)
return true;
return false;
}