[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More finalize woes
From: |
Per Bothner |
Subject: |
Re: More finalize woes |
Date: |
Thu, 06 Mar 2003 17:06:36 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210 |
Stephen Crawley wrote:
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.
It can know that any *correct* implementation of Object.finalize is
a no-op, so there is no reason it call it. It is hard to imagine any
use for a non-empty Object.finalize; any VM-specific actions on
object cleanup should be part of the run-time system instead.
An unnecessary call to java.lang.Object.finalize() won't hurt anyone.
Well, there is always performance ...
Besides, this would only be a compiler warning, and the user would be
free to ignore it.
Many projects, including gcc itself, prohibit warnings.
--
--Per Bothner
address@hidden http://www.bothner.com/per/
- Re: More finalize woes, (continued)
- Re: More finalize woes, Dalibor Topic, 2003/03/04
- Re: More finalize woes, Chris Gray, 2003/03/06
- Re: More finalize woes, Tom Tromey, 2003/03/06
- 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 <=
- 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
- Re: More finalize woes, Brian Jones, 2003/03/06
- Re: More finalize woes, Per Bothner, 2003/03/07
- Re: More finalize woes, Chris Gray, 2003/03/07
- Re: More finalize woes, Stephen Crawley, 2003/03/09