Monday, June 23, 2008

SharePoint object disposal

Special thanks to Brian, who commented on our Creating a Page Layout posting. I had forgot to create a using statement to automatically dispose of SPWeb in my feature receiver. Brian referred me to another blog post which gives an excellent listing of disposal concerns and best practices for overcoming them in SharePoint.

I strongly encourage you all to review these and ensure you are informed on when and why you should dispose of your SharePoint objects.

No comments: