This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: threads+CNI+SIGINT



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]