🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #435

Re: How to cleanup when a class is destroyed ?

#435
From: DavidL
Date: Thu, 12 Oct 2000 00:00
33 lines
1775 bytes
Thanks Benjamin.

I will look at that now.

"Benjamin Johnston" <s355171@student.uq.edu.au> wrote in message
news:8s4972$43o$1@bunyip.cc.uq.edu.au...
> >
...snip...
>
> Take a look at the JavaDocs for;
> System.runFinalizersOnExit(boolean);
>
> And
> Object.finalize();
>
>
> But, keep in mind that most of the time you'll find that you
won't/shouldn't
> need to do any finalization at all (its more of a C++ thing)...
>
> To quote "Java 2 Performance and Idiom Guide";
> For many resources (threads, files, sockets and so on) it will be usually
be
> completely obvious when they can be released or closed. The finalize
method,
> on the other hand, should be used as a last-ditch cleanup effort for
> de-registration.
>
> -Benjamin Johnston
> s355171@student.uq.edu.au
>
>
>
Technical Details
Message-ID: <39e5ac00$1@server.local>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39e57bc3$1@server.local> <uDgF5.2142$wG1.4828@news-server.bigpond.net.au> <39e5962b$1@server.local> <8s4972$43o$1@bunyip.cc.uq.edu.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,d25b87a070be9251
X-Google-Attributes: gid10d6db,public
From: "DavidL" <email.address@in.message>
Subject: Re: How to cleanup when a class is destroyed ?
Date: 2000/10/12
Message-ID: <39e5ac00$1@server.local>
X-Deja-AN: 680543327
References: <39e57bc3$1@server.local> <uDgF5.2142$wG1.4828@news-server.bigpond.net.au> <39e5962b$1@server.local> <8s4972$43o$1@bunyip.cc.uq.edu.au>
X-Original-NNTP-Posting-Host: 192.168.0.5
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Complaints-To: news@bigpond.net.au
X-Trace: news-server.bigpond.net.au 971353506 144.132.179.174 (Thu, 12 Oct 2000 23:25:06 EST)
X-Authenticated-User: davidl
Organization: BigPond Internet Services (http://www.bigpond.net.au)
X-Original-Trace: 12 Oct 2000 23:18:08 +1100, 192.168.0.5
X-MSMail-Priority: Normal
NNTP-Posting-Date: Thu, 12 Oct 2000 23:25:06 EST
Newsgroups: aus.computers.java