Dispose patterns by example

Published 16 May 08 10:53 AM

Roger Lamb has posted a great article of dispose patterns. He will also update as new leak guidance are released.

 

Windows SharePoint Services (WSS 3.0) and Microsoft Office SharePoint Server (MOSS 2007) have some gotchas with serious implications that every SharePoint application developer needs to be intimately familiar with before deploying into production MOSS 2007 farms.  In particular, Microsoft.SharePoint.SPSite , Microsoft.SharePoint.SPWeb , and the often overlooked (MOSS 2007) Microsoft.SharePoint.Publishing.PublishingWeb objects need to be carefully examined and disposed of properly in order to avoid potential memory leaks.

My objective with this blog post was to consolidate several sources compiled by Microsoft's top subject matter experts into a simplified quick reference format which can be used to increase awareness as well as jump start into a SharePoint custom code review. Look for a follow-up post where I will do a high level walk-through using the windows debugger (windbg) to help identify common SharePoint memory leaks.

 

 

I posted an example on his page (a comment). Do you have a suggestion on how to solve it in a better manner or pattern?

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Microsoft » Blog Archive » Dispose patterns by example said on May 16, 2008 6:55 AM:

PingBack from http://microsoft.wawblog.info/?p=28305

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

About Stian Kirkeberg

Stian Kirkeberg - Senior Consultant, Microsoft Consulting Services

This Blog

Syndication

Page view tracker