Sharepoint Object Model - Good Practices

Dispose those objects! If you’re using the SharePoint object model anywhere, make sure that you dispose any objects that you create (not those that the SharePoint object model creates for you, like calling GetContextWeb()). These objects have a small memory footprint visible to the Garbage Collector, but a large amount of unmanaged resources (effectively not visible to the Garbage Collector). If you don’t dispose of them, the GC will not be in any rush to free up the memory used by these objects since it can’t (or won’t) see the bigger picture. [Read More]