Jul 28, 2010
To Dispose or not Dispose?! That is the question...
To make matters more confusing for SharePoint developers there are times when SPSite andSPWeb objects should not be disposed and are cleaned up by SharePoint and ASP.NET after page processing is completed. In addition, there are cases when developers indirectly call a property on a object that creates and holds an internal reference to a SPSite or SPWeb object (for example SPSite.ParentWeb property). Understanding the origin and the scope the object was created is paramount when determining whether or not to explicitly call dispose.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment