1 minute read
I spotted a couple of things out in the InterWebs yesterday that I thought would be of general interest.
SPDisposeCheck is a tool that helps developers and administrators check custom SharePoint solutions that use the SharePoint Object Model helping measure against known Microsoft dispose best practices. This tool may not show all memory leaks in your code and may produce false positives which need further review by subject matter experts.
The SPDisposeCheck updated tool remains a standalone command line utility and we’ve added a Visual Studio 2008/2010 IDE Add-In which calls out to the SPDisposeCheck. This Add-In was originally presented at the SPC 2009 and is now available publically. In addition this version has been tested with both WSS 3.0 + MOSS 2007 and SharePoint 2010 (Foundation and Server) environments.
Finally, we have added several checks on when “NOT” to Dispose objects instantiated by SharePoint internally. These newly reported “DO NO DISPOSE” (DND) rules were unreported by SPDisposeCheck v1.3.* . We would encourage you to run the updated SPDisposeCheck tool on all customized SharePoint projects to help identify areas in code which may lead to memory pressure and server stability issues. As a best practice you should consider adding this tool to your SharePoint software development life cycle build process and review its output with a subject matter expert on a regular interval.
Everyone and their brother was tweeting this yesterday, but it still seemed worth pointing it out, especially since SPDisposeCheck is now available as a Visual Studio add-in. In my experience, not cleaning up after themselves seems to be one of the biggest mistakes I’ve seen in custom Web Part development.
Second, there’s a new set of Visio stencils for SharePoint available from Microsoft.
Download this zip file of Microsoft Visio stencils to create your own diagrams for models of server deployments. For examples of how the IT pro content publishing team for Microsoft Office 2010, Microsoft SharePoint Server 2010, Microsoft Project Server 2010, Microsoft Search Server 2010, and Microsoft SharePoint Foundation used these shapes, see these pages: