<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Add-In Lifetime Management [Pete Sheill, Jim Miller]</title><link>http://blogs.msdn.com/clraddins/archive/2007/07/18/add-in-lifetime-management-pete-sheill-jim-miller.aspx</link><description>A good question to ask when evaluating a design is ‘how is the lifetime of this object or component managed?’ That is, · How do you know it isn’t needed anymore? · Is it possible to release the resources while the object is still in use? · Is it possible</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Add-In Lifetime Management [Pete Sheill, Jim Miller]</title><link>http://blogs.msdn.com/clraddins/archive/2007/07/18/add-in-lifetime-management-pete-sheill-jim-miller.aspx#3955704</link><pubDate>Thu, 19 Jul 2007 16:55:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3955704</guid><dc:creator>David Levine</dc:creator><description>&lt;P&gt;One of the benefits of appdomains is it provides a separation of components into lightweight "mini-processes". However, a drawback is that sometimes it is impossible to unload the appdomain. A single thread stuck in a call to unmanaged code can prevent the appdomain from unloading - we run into this a lot as we have a great deal of legacy code we must interoperate with. &lt;/P&gt;
&lt;P&gt;Each appdomain that remains loaded but unusable acts as a memory and resource leak. This causes problems in long-lived services, which is one of the places we use a plugin model; we load each plugin into its own appdomain. &lt;/P&gt;
&lt;P&gt;Is any work contemplated or underway to better handle this scenario?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description></item><item><title>re: Add-In Lifetime Management [Pete Sheill, Jim Miller]</title><link>http://blogs.msdn.com/clraddins/archive/2007/07/18/add-in-lifetime-management-pete-sheill-jim-miller.aspx#4295369</link><pubDate>Wed, 08 Aug 2007 20:04:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4295369</guid><dc:creator>JackG</dc:creator><description>&lt;p&gt;David, I assume you are enabling unmanaged code in your Add-in's. We can't unwind threads that are not in managed code. &amp;nbsp;We must wait for the call to unmanaged code to return. &amp;nbsp;The library author could use the DomainUnload event. &amp;nbsp;Or you could possibly run the Add-in out of process. - JackG&lt;/p&gt;</description></item></channel></rss>