> Sascha Brawer wrote:
> 
> > So, should a Java-to-Bytecode compiler emit a warning if a finalize()
> > implementation does not call super.finalize()? This might be a suggestion
> > for gcj, jikes, javac etc. Also, we might want to add a note to the
> > Classpath hacker's guide.
> 
> What about classes inheriting directly from Object ? Should they also be 
> forced to call super.finalize() ?

I'd say yes.  A compiler cannot know what the target VM's implementation of
java.lang.Object.finalize() does, and hence whether calling it is necessary.  
An unnecessary call to java.lang.Object.finalize() won't hurt anyone.
Besides, this would only be a compiler warning, and the user would be
free to ignore it.

-- Steve



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to