A couple years ago, a consultant wrote a custom MOSS 2007 web service for my company and it has been in use ever since. Recently we began having performance problems with the service and upon looking at the code, I am not seeing any proper disposal.
I have read the many different blogs/articles about proper disposal but I am confused as to where in the code is the correct place to put the disposal. Any advice would be much appreciated.
// get SharePoint list from the GUID passed this method SPSite site = new SPSite(url); SPWeb web = site.OpenWeb(); SPList list = web.Lists[new Guid(guid.Replace("{", "").Replace("}", "").Trim())];