Bear in mind that Enum's empty final finalize() method is a security
fix, preventing subclasses from creating illegal enum values. That
security fix can easily apply to other classes too - any class which
wants to control when subclasses can be instantiated by throwing
exceptions from the constructor needs a final finalize().

I don't know whether this applies to Inflater but it does suggest that
optimizing for empty finalize() is a good idea regardless, because
people shouldn't have to choose between performance issues and
security.

(optimizing for a finalize() that simply calls super.finalize() might
be worthwhile too?)

Stuart.

On 21 Dec 2006 09:16:07 -0700, Tom Tromey <[EMAIL PROTECTED]> wrote:
>>>>> "Twisti" == Christian Thalinger <[EMAIL PROTECTED]> writes:

Twisti> 87% precent of the heap allocations with a finalizer have an empty
Twisti> finalizer.  The class responsible for this is java/util/zip/Inflater.

I think we can simply delete Inflater.finalize.

Tom




--
http://sab39.netreach.com/

Reply via email to