Monday, March 29, 2010

SPDisposeChecker - Avoid memory leak patterns in your code

There are a number of rules and best practices when it comes to developing against the SharePoint API.
Here's a bunch of them:


No matter how well you know these rules there are times when your brain will temporary forget about them. There are also scenarios that can be a bit tricky to recognize as a "dispose scenario".
One example of the latter is when using the indexer on a SPSiteColletion for instance, see this article for details:
One great thing about being a developer on the 20th century (apart from the Internet - thank you mr Lee!) are the Open Source projects and utilities out there.

SPDisposeChecker is such a utility that should be part of every SharePoint developers toolbox.
It helps you analyze your assemblies and points out memory leak patterns before your customer/manager calls you up Friday afternoon.

Read more about the utility and download it here:

Kudos to the SPDisposeChecker team!


And the soundtrack for this post?
L'homme propose, Dieu dispose (Man proposes, God disposes)

No comments:

Post a Comment