views:

209

answers:

1

One of my gripes with SharePoint 2007 are the complicated SPWeb.Dispose rules that can either cause a big resource leak if you don't dispose what you have to, or all sorts of other weird issues if you dispose when you don't have to. Roger Lamb's Posting tries to summarize the madness. but I wonder if SharePoint 2010 improves this?

I have the Beta setup but don't really see much difference here, but was some of the stuff at least improved?

+6  A: 

Yes. You still need to carefully dispose of SPSite and SPWeb instances in SharePoint 2010. The last I checked, SPDisposeCheck had not been updated for SharePoint 2010. If it hasn't already been released, I'm certain it will be soon.

Rob Windsor
Thanks. Oh well, let's hope that they fix that in Sharepoint 2014 :)
Michael Stum
By the time 2014 comes out, you will know what to dispose and what not to dispose :) But ofcourse, let's hope.
Janis Veinbergs
FYI, the SPDisposeCheck tool still works fine for the 2010 OM; nothing's really changed around the managed resources and when they need to be explicitly disposed.
OedipusPrime