When coding in SharePoint you should ALWAYS dispose of SPWeb and SPSite objects. They use a small amount of managed code and a large amount of unmanaged code. As a result of the small managed code, the garbage collector doesn't clear out the items from memory which can lead to a world of pain...
Best Practices: Using Disposable Windows SharePoint Services Objects
No comments:
Post a Comment