I have been using SPDisposeChecker & reading through http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx but there are some conditions I am unsure of..
I believe this has become ok and the web is disposed with the paerent SPSite
using( SPSite mySite = new SPSite("...")){ SPWeb rootWeb = mySite.RootWeb; ... }
I think I need to dispose this because it uses open web but not sure since its created with SPContext
SPWeb myWeb = SPContext.Current.Site.OpenWeb("myWebUrl");
Very confident I should here
UserProfile profile = ProfileLoader.GetProfileLoader().GetUserProfile(); SPSite mySite = profile.PersonalSite;
How can I execute code & measure if there is a leak? Is it possible?