<?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: Why is finalize method protected?</title>
	<atom:link href="http://www.0xcafefeed.com/2005/09/why-is-finalize-method-protected/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.0xcafefeed.com/2005/09/why-is-finalize-method-protected/</link>
	<description>Thoughts on Java™, Java EE™ and web application development</description>
	<lastBuildDate>Fri, 30 Apr 2010 07:48:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Neeraj</title>
		<link>http://www.0xcafefeed.com/2005/09/why-is-finalize-method-protected/comment-page-1/#comment-258</link>
		<dc:creator>Neeraj</dc:creator>
		<pubDate>Mon, 24 Aug 2009 07:21:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.0xCAFEFEED.com/?p=12#comment-258</guid>
		<description>The artical is really very informatic, almost all te doubt have been clear. Thanks</description>
		<content:encoded><![CDATA[<p>The artical is really very informatic, almost all te doubt have been clear. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rajiv</title>
		<link>http://www.0xcafefeed.com/2005/09/why-is-finalize-method-protected/comment-page-1/#comment-32</link>
		<dc:creator>rajiv</dc:creator>
		<pubDate>Fri, 23 Sep 2005 02:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.0xCAFEFEED.com/?p=12#comment-32</guid>
		<description>Hello Tom, &lt;br/&gt;&lt;br/&gt;If the finalize method of the super class were private, I agree that the compiler can not inject the regular virtual method invocation byte code: &lt;a HREF=&quot;http://java.sun.com/docs/books/vmspec/2nd-edition/html/Instructions2.doc6.html#invokevirtual&quot; REL=&quot;nofollow&quot; rel=&quot;nofollow&quot;&gt;invokevirtual &lt;/a&gt; (ref-to-super-private-finalize-method. The compiler should instead inject: &lt;a HREF=&quot;http://java.sun.com/docs/books/vmspec/2nd-edition/html/Instructions2.doc6.html#invokespecial&quot; REL=&quot;nofollow&quot; rel=&quot;nofollow&quot;&gt;invokespecial &lt;/a&gt; (ref-to-super-private-finalize-method).  &lt;br/&gt;&lt;br/&gt;Why would the garbage collector have to call finalize on all the instances? It should be able to identify classes which define the method finalize and call it only on instances of those classes, as it does now.</description>
		<content:encoded><![CDATA[<p>Hello Tom, </p>
<p>If the finalize method of the super class were private, I agree that the compiler can not inject the regular virtual method invocation byte code: <a HREF="http://java.sun.com/docs/books/vmspec/2nd-edition/html/Instructions2.doc6.html#invokevirtual" REL="nofollow" rel="nofollow">invokevirtual </a> (ref-to-super-private-finalize-method. The compiler should instead inject: <a HREF="http://java.sun.com/docs/books/vmspec/2nd-edition/html/Instructions2.doc6.html#invokespecial" REL="nofollow" rel="nofollow">invokespecial </a> (ref-to-super-private-finalize-method).  </p>
<p>Why would the garbage collector have to call finalize on all the instances? It should be able to identify classes which define the method finalize and call it only on instances of those classes, as it does now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Hawtin</title>
		<link>http://www.0xcafefeed.com/2005/09/why-is-finalize-method-protected/comment-page-1/#comment-31</link>
		<dc:creator>Tom Hawtin</dc:creator>
		<pubDate>Fri, 23 Sep 2005 00:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.0xCAFEFEED.com/?p=12#comment-31</guid>
		<description>private methods are not virtual, so there can be no overriding. I private methods were used for finalize, then the JVM would need to call finalize for each class of each object.&lt;br/&gt;&lt;br/&gt;Using a guard object makes errors less likely.</description>
		<content:encoded><![CDATA[<p>private methods are not virtual, so there can be no overriding. I private methods were used for finalize, then the JVM would need to call finalize for each class of each object.</p>
<p>Using a guard object makes errors less likely.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

