<?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/"
		>
<channel>
	<title>Comments on: The Component Burden</title>
	<atom:link href="http://elegantcode.com/2008/12/14/the-component-burden/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2008/12/14/the-component-burden/</link>
	<description></description>
	<lastBuildDate>Sun, 14 Mar 2010 12:04:09 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Davy Brion</title>
		<link>http://elegantcode.com/2008/12/14/the-component-burden/comment-page-1/#comment-39740</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 15 Dec 2008 20:00:11 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1692#comment-39740</guid>
		<description>i go for transient as much as possible as well, but that doesn&#039;t relieve you from the burden of having to dispose them properly (if they are disposable)

of course, if you&#039;re using a Castle build with the component burden fix already included, then this is not an issue anymore</description>
		<content:encoded><![CDATA[<p>i go for transient as much as possible as well, but that doesn&#8217;t relieve you from the burden of having to dispose them properly (if they are disposable)</p>
<p>of course, if you&#8217;re using a Castle build with the component burden fix already included, then this is not an issue anymore</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Pierce</title>
		<link>http://elegantcode.com/2008/12/14/the-component-burden/comment-page-1/#comment-39731</link>
		<dc:creator>Bill Pierce</dc:creator>
		<pubDate>Mon, 15 Dec 2008 17:33:05 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1692#comment-39731</guid>
		<description>I don&#039;t think you should ever dispose of an instance you didn&#039;t create.  Why would you?  You have no way of knowing whom else is using it regardless of the prescense of an IoC container.

I agree, if you are using a container, it should be properly disposing of instances as needed.  You pointed out this feature was a long time coming to Windsor because it is a complex issue when you mix dependencies of differing lifestyles.  Because of this I try to go the opposite direction than most users and strive for all transient components unless object creation is very expensive.

-Bill</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think you should ever dispose of an instance you didn&#8217;t create.  Why would you?  You have no way of knowing whom else is using it regardless of the prescense of an IoC container.</p>
<p>I agree, if you are using a container, it should be properly disposing of instances as needed.  You pointed out this feature was a long time coming to Windsor because it is a complex issue when you mix dependencies of differing lifestyles.  Because of this I try to go the opposite direction than most users and strive for all transient components unless object creation is very expensive.</p>
<p>-Bill</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergio Pereira</title>
		<link>http://elegantcode.com/2008/12/14/the-component-burden/comment-page-1/#comment-39727</link>
		<dc:creator>Sergio Pereira</dc:creator>
		<pubDate>Mon, 15 Dec 2008 16:12:14 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1692#comment-39727</guid>
		<description>Funny. I thought I had read it carefully... Oh, well, consider my comment just an echo, then, or a reinforcement of the issue.</description>
		<content:encoded><![CDATA[<p>Funny. I thought I had read it carefully&#8230; Oh, well, consider my comment just an echo, then, or a reinforcement of the issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://elegantcode.com/2008/12/14/the-component-burden/comment-page-1/#comment-39720</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 15 Dec 2008 13:35:46 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1692#comment-39720</guid>
		<description>I did actually mention that problem :)

&quot;Suppose someone makes the change to the dependency and then configures the IoC container to always return a singleton instance of this dependency. If nobody thinks about the fact that the Controller still assumes a Transient lifecycle of the dependency, the disposal of the dependency will not be removed from the Controller class. Once a Controller instance is created, and then disposed, it will try to dispose the instance of its dependency, which will cause problems because that instance is supposed to be used by other objects as well!&quot;</description>
		<content:encoded><![CDATA[<p>I did actually mention that problem <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#8220;Suppose someone makes the change to the dependency and then configures the IoC container to always return a singleton instance of this dependency. If nobody thinks about the fact that the Controller still assumes a Transient lifecycle of the dependency, the disposal of the dependency will not be removed from the Controller class. Once a Controller instance is created, and then disposed, it will try to dispose the instance of its dependency, which will cause problems because that instance is supposed to be used by other objects as well!&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergio Pereira</title>
		<link>http://elegantcode.com/2008/12/14/the-component-burden/comment-page-1/#comment-39719</link>
		<dc:creator>Sergio Pereira</dc:creator>
		<pubDate>Mon, 15 Dec 2008 13:33:21 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1692#comment-39719</guid>
		<description>Davy, another problem with releasing the dependency yourself is that you are assuming the dependency is indeed transient. If in the future you change that dependency&#039;s implementation and configuration because you need or prefer that it is, say, a singleton then you&#039;ll have to go back into your controllers and stop disposing that type of dependency. I did not know component burden had been added to the trunk. I guess that means we are getting closer to castle 1.0 RTM, FWIW.</description>
		<content:encoded><![CDATA[<p>Davy, another problem with releasing the dependency yourself is that you are assuming the dependency is indeed transient. If in the future you change that dependency&#8217;s implementation and configuration because you need or prefer that it is, say, a singleton then you&#8217;ll have to go back into your controllers and stop disposing that type of dependency. I did not know component burden had been added to the trunk. I guess that means we are getting closer to castle 1.0 RTM, FWIW.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://elegantcode.com/2008/12/14/the-component-burden/comment-page-1/#comment-39665</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sun, 14 Dec 2008 15:37:31 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1692#comment-39665</guid>
		<description>interesting, thx for the tip :)</description>
		<content:encoded><![CDATA[<p>interesting, thx for the tip <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://elegantcode.com/2008/12/14/the-component-burden/comment-page-1/#comment-39664</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Sun, 14 Dec 2008 15:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/?p=1692#comment-39664</guid>
		<description>You may want to look at another popular IoC container, Autofac.  It handles the disposal problem perfectly.</description>
		<content:encoded><![CDATA[<p>You may want to look at another popular IoC container, Autofac.  It handles the disposal problem perfectly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
