<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: The New Definitive SPSite/SPWeb Disposal Article</title>
	<atom:link href="http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/feed/" rel="self" type="application/rss+xml" />
	<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/</link>
	<description>Random thoughts on custom development in SharePoint.</description>
	<lastBuildDate>Fri, 06 Jan 2012 00:13:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Keith Dahlby</title>
		<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/#comment-558</link>
		<dc:creator><![CDATA[Keith Dahlby]]></dc:creator>
		<pubDate>Sat, 31 Oct 2009 02:17:21 +0000</pubDate>
		<guid isPermaLink="false">http://solutionizing.net/?p=214#comment-558</guid>
		<description><![CDATA[Great questions, Andy. You&#039;re fine to use SPContext.Current in a custom web service because ASMX still participate in the ASP.NET request lifecycle. SharePoint registers an IHttpModule (Microsoft.SharePoint.ApplicationRuntime.SPRequestModule) which takes responsibility for cleaning up the context objects.

The most efficient way to iterate over a large tree of SPWeb objects is to use SPSite.AllWebs, which flattens the heirarchy and creates no parent-child web dependencies (unless you use ParentWeb or a member that requires it). If you have to navigate as a tree structure, you will need to leaving your chain of parent webs open. As you&#039;re enumerating through a web&#039;s child SPWebCollection, internally each successive web is created through the internal SPWeb+SPWebCollectionProvider class, whose OpenWeb() method depends on the parent web.

Hope this helps ~
Keith]]></description>
		<content:encoded><![CDATA[<p>Great questions, Andy. You&#8217;re fine to use SPContext.Current in a custom web service because ASMX still participate in the ASP.NET request lifecycle. SharePoint registers an IHttpModule (Microsoft.SharePoint.ApplicationRuntime.SPRequestModule) which takes responsibility for cleaning up the context objects.</p>
<p>The most efficient way to iterate over a large tree of SPWeb objects is to use SPSite.AllWebs, which flattens the heirarchy and creates no parent-child web dependencies (unless you use ParentWeb or a member that requires it). If you have to navigate as a tree structure, you will need to leaving your chain of parent webs open. As you&#8217;re enumerating through a web&#8217;s child SPWebCollection, internally each successive web is created through the internal SPWeb+SPWebCollectionProvider class, whose OpenWeb() method depends on the parent web.</p>
<p>Hope this helps ~<br />
Keith</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/#comment-556</link>
		<dc:creator><![CDATA[Andy]]></dc:creator>
		<pubDate>Thu, 29 Oct 2009 17:08:14 +0000</pubDate>
		<guid isPermaLink="false">http://solutionizing.net/?p=214#comment-556</guid>
		<description><![CDATA[What about a custom web service (.ASMX) placed in the Layouts folder, how does sharepoint know to automatically dispose of SPContext.Current.Web when the whole request is handled by code you wrote? (i.e does not extend one of the SharePoint classes) So the question is, where are these context objects disposed? I think they are not disposed.

Also, is there a suggested pattern for itterating through large tree&#039;s of SPWeb objects without having SPWeb * depthOfTree undisposed at the same time? So in otherwords itterate a tree of SPWeb Objects but only having one undisposed SPWeb at a time?]]></description>
		<content:encoded><![CDATA[<p>What about a custom web service (.ASMX) placed in the Layouts folder, how does sharepoint know to automatically dispose of SPContext.Current.Web when the whole request is handled by code you wrote? (i.e does not extend one of the SharePoint classes) So the question is, where are these context objects disposed? I think they are not disposed.</p>
<p>Also, is there a suggested pattern for itterating through large tree&#8217;s of SPWeb objects without having SPWeb * depthOfTree undisposed at the same time? So in otherwords itterate a tree of SPWeb Objects but only having one undisposed SPWeb at a time?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SharePoint Code Optimization &#171; Emad&#8217;s Weblog</title>
		<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/#comment-225</link>
		<dc:creator><![CDATA[SharePoint Code Optimization &#171; Emad&#8217;s Weblog]]></dc:creator>
		<pubDate>Fri, 27 Feb 2009 21:15:42 +0000</pubDate>
		<guid isPermaLink="false">http://solutionizing.net/?p=214#comment-225</guid>
		<description><![CDATA[[...] http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/ [...]]]></description>
		<content:encoded><![CDATA[<p>[...] <a href="http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/" rel="nofollow">http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Dahlby</title>
		<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/#comment-116</link>
		<dc:creator><![CDATA[Keith Dahlby]]></dc:creator>
		<pubDate>Fri, 02 Jan 2009 09:39:19 +0000</pubDate>
		<guid isPermaLink="false">http://solutionizing.net/?p=214#comment-116</guid>
		<description><![CDATA[I&#039;ll try to keep this post updated, but &lt;a href=&quot;http://sharepointdevwiki.com/x/5IAq&quot; title=&quot;When to Dispose SharePoint objects&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt; on the SharePoint Dev Wiki should have the community&#039;s latest thoughts on disposal.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ll try to keep this post updated, but <a href="http://sharepointdevwiki.com/x/5IAq" title="When to Dispose SharePoint objects" rel="nofollow">this article</a> on the SharePoint Dev Wiki should have the community&#8217;s latest thoughts on disposal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Disposing list&#8217;s SPSite/SPWeb without ParentWeb &#171; Solutionizing .NET</title>
		<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/#comment-102</link>
		<dc:creator><![CDATA[Disposing list&#8217;s SPSite/SPWeb without ParentWeb &#171; Solutionizing .NET]]></dc:creator>
		<pubDate>Thu, 11 Dec 2008 02:31:56 +0000</pubDate>
		<guid isPermaLink="false">http://solutionizing.net/?p=214#comment-102</guid>
		<description><![CDATA[[...] Disposing list&#8217;s SPSite/SPWeb without&#160;ParentWeb June 15, 2008 &#8212; Keith Dahlby   Update 12/10/2008: Don&#8217;t use this technique; use the guidance here instead: The New Definitive SPSite/SPWeb Disposal Article [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Disposing list&#8217;s SPSite/SPWeb without&nbsp;ParentWeb June 15, 2008 &#8212; Keith Dahlby   Update 12/10/2008: Don&#8217;t use this technique; use the guidance here instead: The New Definitive SPSite/SPWeb Disposal Article [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Dahlby</title>
		<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/#comment-93</link>
		<dc:creator><![CDATA[Keith Dahlby]]></dc:creator>
		<pubDate>Mon, 08 Dec 2008 16:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://solutionizing.net/?p=214#comment-93</guid>
		<description><![CDATA[@Rick ~ Agreed and done. I can&#039;t find a definitive post on this online, but according to Reflector the Web property setter is internal and only set in SPWeb.DoProvisioningCallback to &quot;this&quot;, which should be cleaned up by its owner. Good catch!

I also added SPControl.GetCurrentSite() and Web().

@Peter ~ Clarity at last? We can only hope...]]></description>
		<content:encoded><![CDATA[<p>@Rick ~ Agreed and done. I can&#8217;t find a definitive post on this online, but according to Reflector the Web property setter is internal and only set in SPWeb.DoProvisioningCallback to &#8220;this&#8221;, which should be cleaned up by its owner. Good catch!</p>
<p>I also added SPControl.GetCurrentSite() and Web().</p>
<p>@Peter ~ Clarity at last? We can only hope&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Seale</title>
		<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/#comment-92</link>
		<dc:creator><![CDATA[Peter Seale]]></dc:creator>
		<pubDate>Mon, 08 Dec 2008 16:27:49 +0000</pubDate>
		<guid isPermaLink="false">http://solutionizing.net/?p=214#comment-92</guid>
		<description><![CDATA[Keith, thanks for writing this article, it helped me out for sure.]]></description>
		<content:encoded><![CDATA[<p>Keith, thanks for writing this article, it helped me out for sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick</title>
		<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/#comment-91</link>
		<dc:creator><![CDATA[Rick]]></dc:creator>
		<pubDate>Mon, 08 Dec 2008 16:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://solutionizing.net/?p=214#comment-91</guid>
		<description><![CDATA[Hi, 

I think you should add this one to the &quot;Do not dispose&quot; list as well
SPWebProvisioningProperties.Web

Cheers
Rick]]></description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I think you should add this one to the &#8220;Do not dispose&#8221; list as well<br />
SPWebProvisioningProperties.Web</p>
<p>Cheers<br />
Rick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links (12/7/2008) &#171; Steve Pietrek - Everything SharePoint</title>
		<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/#comment-89</link>
		<dc:creator><![CDATA[Links (12/7/2008) &#171; Steve Pietrek - Everything SharePoint]]></dc:creator>
		<pubDate>Sun, 07 Dec 2008 22:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://solutionizing.net/?p=214#comment-89</guid>
		<description><![CDATA[[...] **** The New Definitive SPSite/SPWeb Disposal Article [...]]]></description>
		<content:encoded><![CDATA[<p>[...] **** The New Definitive SPSite/SPWeb Disposal Article [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Dahlby</title>
		<link>http://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/#comment-87</link>
		<dc:creator><![CDATA[Keith Dahlby]]></dc:creator>
		<pubDate>Sun, 07 Dec 2008 07:16:10 +0000</pubDate>
		<guid isPermaLink="false">http://solutionizing.net/?p=214#comment-87</guid>
		<description><![CDATA[Absolutely - the more eyes, the better the eventual consensus.]]></description>
		<content:encoded><![CDATA[<p>Absolutely &#8211; the more eyes, the better the eventual consensus.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

