This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: threads+CNI+SIGINT
- To: Oskar Liljeblad <osk at hem dot passagen dot se>
- Subject: Re: threads+CNI+SIGINT
- From: Cedric Berger <cedric at wireless-networks dot com>
- Date: Mon, 27 Mar 2000 08:19:05 -0800
- CC: "java-discuss at sourceware dot cygnus dot com" <java-discuss at sourceware dot cygnus dot com>
- Organization: Wireless Networks Inc
- References: <20000327175019.A10593@strix.eductussyd.se>
Oskar Liljeblad wrote:
> How do you deal with objects that override the finalize method,
> needing special finalization?
Finalization must only be used for releasing resources like memory,
syncronization objects, ... which means that its main use is for
native methods.
One exit, the OS will take care of freeing theses resources anyway,
with or without running finalization.
Override the finalize method for, say, closing a socket or a file is not
a good programming practice.
Cedric
begin:vcard
n:Berger;Cedric
tel;fax:++1 (650) 574-4476
tel;work:++1 (650) 574-4472
x-mozilla-html:TRUE
org:Wireless Networks Inc
version:2.1
email;internet:cedric@wireless-networks.com
title:Embedded Software Engineer
adr;quoted-printable:;;2322 El Camino Real=0D=0A;San Mateo;CA;94403;USA
fn:Cedric Berger
end:vcard