>>>>> "Chris" == Chris Gray <[EMAIL PROTECTED]> writes:

Chris> I think the main problem lies elsewhere. If you subclass a
Chris> class which has a finalizer and your subclass needs to do some
Chris> finalization of its own, then your finalizer needs to contain a
Chris> call to super.finalize(). If the published API doesn't show a
Chris> finalizer then you wouldn't include this statement.

But that in itself is a bug.  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.

This doesn't mean that people don't do it, I guess.

Tom


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

Reply via email to