Roger Lamb's SharePoint Developer Blog

SPDisposeCheck SPSite and SPWeb Dispose() Best Practice Utility Announced

Paul Andrew (Microsoft SharePoint Product Group) announced the SPDisposeCheck utility at the Tech·Ed EMEA Developers Conference today.  The SPDisposeCheck command line utility will be released soon (North American Winter) and will recursively scan any destination folder that you specify containing custom WSS 3.0 and Microsoft SharePoint Server 2007 .NET assemblies (scanning MSIL and not the source code itself) looking for SharePoint specific Dispose() best practices (or lack thereof) as listed in the guidance on MSDN Best Practices: Using Disposable Windows SharePoint Services Objects , Best Practices: Common Coding Issues When Using the SharePoint Object Model , and my blog SharePoint 2007 and WSS 3.0 Dispose Patterns by Example .  SPDisposeCheck utility is intended to help quickly scan through a large amount of custom SharePoint code in order to direct an experienced SharePoint developer to areas of concern with regards to proper usage of Dispose().

Additional SPDisposeCheck information:

  • For developer workstations, not to be run on production
  • Built on FX Cop technology the tool opens assemblies and validates them against the Microsoft published guidance (however, not compatible with FX Cop)
  • Output will contain warnings messages for Dispose() method
  • May include “false positives” so expert analysis is required
  • Contact Microsoft support if you need assistance now

Special thanks to Microsoft’s Sean Thompson (Microsoft PFE), Scott Harris, Paul Andrew, and Stefan Goßner.  In addition, I’d like to thank the folks in the field including the MOSS MVP’s and Microsoft Services and Support (MCS/Premier/PFE/CSS) for their feedback and testing.

Published Wednesday, November 12, 2008 5:38 PM by Roger Lamb

Comments

 

infoblog » SPDisposeCheck SPSite and SPWeb Dispose() Best Practice Utility Announced said:

November 12, 2008 5:59 PM
 

Rick's BizTalk Debugging, Troubleshooting Tips and Experiences said:

SPDisposeCheck tool officially announced Last year I leveraged a good friend and coworker (Roger Lamb)

November 13, 2008 1:40 PM
 

Skullcrusher said:

When is the North American Winter for those of us not in that hemisphere?

Is there a beta release available?

December 18, 2008 8:43 PM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker