<?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>A curious case: CLR/COM Interop leak</title><link>http://blogs.msdn.com/b/arvindsh/archive/2012/10/03/a-curious-case-clr-com-interop-leak.aspx</link><description>&amp;#160; Background A customer asked me a question last week: in CLR-COM interop case, who is responsible to free up a string returned from COM? My understanding was that the interop layer setup by .NET will automatically take care of this. However, I thought</description><dc:language>en</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: A curious case: CLR/COM Interop leak</title><link>http://blogs.msdn.com/b/arvindsh/archive/2012/10/03/a-curious-case-clr-com-interop-leak.aspx#10400390</link><pubDate>Thu, 07 Mar 2013 18:09:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10400390</guid><dc:creator>Arkady</dc:creator><description>&lt;p&gt;Method SayHello is defined as [out] in IDL. At the same time the call from C# uses ref. &lt;/p&gt;
&lt;p&gt;1. Is it what automatically generated in interop dll?&lt;/p&gt;
&lt;p&gt;2. Do you still have a leak if you use SayHello(out sout); in C#?&lt;/p&gt;
&lt;p&gt;3. Do you still have a leak if you set sout to null before passing to SayHello?&lt;/p&gt;
&lt;p&gt;string sout = null;&lt;/p&gt;
&lt;p&gt;SayHello(out sout);&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10400390" width="1" height="1"&gt;</description></item><item><title>re: A curious case: CLR/COM Interop leak</title><link>http://blogs.msdn.com/b/arvindsh/archive/2012/10/03/a-curious-case-clr-com-interop-leak.aspx#10357798</link><pubDate>Tue, 09 Oct 2012 15:01:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10357798</guid><dc:creator>Lucian Bargaoanu</dc:creator><description>&lt;p&gt;The parameter is ref, so in and out. This means that the COM server should free it before using it as an out parameter. I think this is the root cause of the problem.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10357798" width="1" height="1"&gt;</description></item><item><title>re: A curious case: CLR/COM Interop leak</title><link>http://blogs.msdn.com/b/arvindsh/archive/2012/10/03/a-curious-case-clr-com-interop-leak.aspx#10355826</link><pubDate>Thu, 04 Oct 2012 09:06:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10355826</guid><dc:creator>Arvind Shyamsundar</dc:creator><description>&lt;p&gt;Yes, I have confirmed by 2 observations: the sample application, left unmodified, will run to a state where it exhausts all address space (~2GB in x86). Secondly, a GC.Collect makes no difference to this scenario.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10355826" width="1" height="1"&gt;</description></item><item><title>re: A curious case: CLR/COM Interop leak</title><link>http://blogs.msdn.com/b/arvindsh/archive/2012/10/03/a-curious-case-clr-com-interop-leak.aspx#10355811</link><pubDate>Thu, 04 Oct 2012 07:58:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10355811</guid><dc:creator>Thomas Olsson</dc:creator><description>&lt;p&gt;Are you sure that these are not cleared at the next GC?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10355811" width="1" height="1"&gt;</description></item></channel></rss>