classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More finalize woes


From: Sascha Brawer
Subject: Re: More finalize woes
Date: Thu, 6 Mar 2003 18:01:59 +0100

Tom Tromey <address@hidden> wrote on Thu, 6 Mar 2003 08:44:53 -0700:

>Binary compatibility rules allow a class
>implementor to add a finalize method at any time in the future.  For
>this reason, all finalizers should call super.finalize().  In fact, if
>we add an empty finalize method, then that is a potential (if
>unlikely) bug -- if we ever add a finalizer in a superclass, oops.

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.

-- Sascha






reply via email to

[Prev in Thread] Current Thread [Next in Thread]