This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
RE: [cp-patches] [PATCH] Fix PR classpath/24086, PR classpath/24091, PR classpath/24104 et al. ...
- From: "Jeroen Frijters" <jeroen at sumatra dot nl>
- To: "David Daney" <ddaney at avtrex dot com>
- Cc: "Java Patch List" <java-patches at gcc dot gnu dot org>,"Classpath Patches" <classpath-patches at gnu dot org>
- Date: Thu, 13 Oct 2005 09:48:37 +0200
- Subject: RE: [cp-patches] [PATCH] Fix PR classpath/24086, PR classpath/24091, PR classpath/24104 et al. ...
David Daney wrote:
> A finalizer is simple and gets the job done.
Finalizers are anything but simple. They really should only be used to
free native resources (as a last resort), not for any type of Java clean
up. Blocking and locking should be avoided in a finalizer. Typically
there is only one finalizer thread and you don't want to hog that by
blocking on I/O.
I wrote about how finalize should be used on my blog:
http://weblog.ikvm.net/permalink.aspx?guid=3E0ABC11-F486-4366-9127-CF38B
B6C3EF1
Regards,
Jeroen