<?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: Outparams: Take 2</title>
	<atom:link href="http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/</link>
	<description>Just another Blog.mozilla.com weblog</description>
	<lastBuildDate>Wed, 11 Nov 2009 17:56:44 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: tglek</title>
		<link>http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/comment-page-1/#comment-2835</link>
		<dc:creator>tglek</dc:creator>
		<pubDate>Wed, 22 Aug 2007 00:08:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/#comment-2835</guid>
		<description>Sergey,
https://bugzilla.mozilla.org/show_bug.cgi?id=391275

Should answer 1.

2. QI does addref</description>
		<content:encoded><![CDATA[<p>Sergey,<br />
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=391275" rel="nofollow">https://bugzilla.mozilla.org/show_bug.cgi?id=391275</a></p>
<p>Should answer 1.</p>
<p>2. QI does addref</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey Yanovich</title>
		<link>http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/comment-page-1/#comment-2809</link>
		<dc:creator>Sergey Yanovich</dc:creator>
		<pubDate>Mon, 20 Aug 2007 20:39:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/#comment-2809</guid>
		<description>The below questions are posted here, because I inferred that this blog&#039;s author is sharpening the bleeding edge of mozilla&#039;s deCOMtamination. If I am wrong, the guidance where such issues belong is appreciated. A couple of questions:

1. You plan to use return value instead of outparam to fetch QI result. Will the result still be addref&#039;ed?

2. Smart pointers like nsCOMPtr are facilitating RAII design pattern. One assigns all acquired resources to such pointers, uses the resources as long as it makes sense, and forgets about the resources as they lose value. Smart pointers do the rest of the job - releasing.

I assume that if QI is not addref&#039;ing, then if I use a smart pointer once, the reference I hold becomes owning. If I pass it further, it will always be addref&#039;ed thereafter.

If the above paragraph is correct, maybe it makes sense to introduce a third method to deal with reference counting like &#039;Unref()&#039; which will reduce refcount, but won&#039;t cause destruction. And nsReturnPtr smart pointer which will call Unref() instead of Release(), thus bringing the return value resource to pristine &#039;unsmarted&#039; state and allowing to pass it further as a raw pointer.</description>
		<content:encoded><![CDATA[<p>The below questions are posted here, because I inferred that this blog&#8217;s author is sharpening the bleeding edge of mozilla&#8217;s deCOMtamination. If I am wrong, the guidance where such issues belong is appreciated. A couple of questions:</p>
<p>1. You plan to use return value instead of outparam to fetch QI result. Will the result still be addref&#8217;ed?</p>
<p>2. Smart pointers like nsCOMPtr are facilitating RAII design pattern. One assigns all acquired resources to such pointers, uses the resources as long as it makes sense, and forgets about the resources as they lose value. Smart pointers do the rest of the job &#8211; releasing.</p>
<p>I assume that if QI is not addref&#8217;ing, then if I use a smart pointer once, the reference I hold becomes owning. If I pass it further, it will always be addref&#8217;ed thereafter.</p>
<p>If the above paragraph is correct, maybe it makes sense to introduce a third method to deal with reference counting like &#8216;Unref()&#8217; which will reduce refcount, but won&#8217;t cause destruction. And nsReturnPtr smart pointer which will call Unref() instead of Release(), thus bringing the return value resource to pristine &#8216;unsmarted&#8217; state and allowing to pass it further as a raw pointer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tglek</title>
		<link>http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/comment-page-1/#comment-2681</link>
		<dc:creator>tglek</dc:creator>
		<pubDate>Thu, 09 Aug 2007 00:52:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/#comment-2681</guid>
		<description>We&#039;ll get objectiveC supported. It&#039;s mostly todo with teaching MCPP to deal with OSX include paths.</description>
		<content:encoded><![CDATA[<p>We&#8217;ll get objectiveC supported. It&#8217;s mostly todo with teaching MCPP to deal with OSX include paths.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cbarrett</title>
		<link>http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/comment-page-1/#comment-2680</link>
		<dc:creator>cbarrett</dc:creator>
		<pubDate>Wed, 08 Aug 2007 23:43:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/#comment-2680</guid>
		<description>What sort of strangeness does it not support? I&#039;m assuming it doesn&#039;t know about Objective-C at all, and most of the Mac code has ObjC and C++ intermingling. Is there anything beyond that?</description>
		<content:encoded><![CDATA[<p>What sort of strangeness does it not support? I&#8217;m assuming it doesn&#8217;t know about Objective-C at all, and most of the Mac code has ObjC and C++ intermingling. Is there anything beyond that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bo</title>
		<link>http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/comment-page-1/#comment-2649</link>
		<dc:creator>Bo</dc:creator>
		<pubDate>Tue, 07 Aug 2007 01:49:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/#comment-2649</guid>
		<description>Hey, this is great stuff! I&#039;m glad you&#039;re documenting your progress in this blog.</description>
		<content:encoded><![CDATA[<p>Hey, this is great stuff! I&#8217;m glad you&#8217;re documenting your progress in this blog.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
