tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: finalize question
Date Wed, 02 Nov 2005 18:09:28 GMT
> From: Andy Kriger [mailto:andy.kriger@gmail.com] 
> Subject: finalize question
> 
> Problem is, I'm not seeing any finalize methods being called.

Reliance on finalizers is a sign of extremely poor application design.
First, it can be a significant performance hit, since objects with
finalizers have to be handled specially both by allocation and garbage
collection.  Second, there's no guarantee that a finalizer will _ever_
be called, so if you're dependent on that happening, you're in trouble
right from the start.  Much better to design your app with discrete
event handling and not leave it up to the whims of the garbage
collector.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message