[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More finalize woes
From: |
Tom Tromey |
Subject: |
Re: More finalize woes |
Date: |
06 Mar 2003 08:44:53 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
>>>>> "Chris" == Chris Gray <address@hidden> 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
- More finalize woes, Jeroen Frijters, 2003/03/04
- Re: More finalize woes, Aaron M. Renn, 2003/03/04
- Re: More finalize woes, Dalibor Topic, 2003/03/04
- Re: More finalize woes, Chris Gray, 2003/03/06
- Re: More finalize woes,
Tom Tromey <=
- Re: More finalize woes, Sascha Brawer, 2003/03/06
- Re: More finalize woes, Artur Biesiadowski, 2003/03/06
- Re: More finalize woes, Stephen Crawley, 2003/03/06
- Re: More finalize woes, Per Bothner, 2003/03/06
- Re: More finalize woes, Stephen Crawley, 2003/03/06
- Re: More finalize woes, Stephen Crawley, 2003/03/06
- Re: More finalize woes, Per Bothner, 2003/03/06
- Re: More finalize woes, Stephen Crawley, 2003/03/06
- Re: More finalize woes, Per Bothner, 2003/03/07
- Re: More finalize woes, Tom Tromey, 2003/03/06