🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #446

Re: How to cleanup when a class is destroyed ?

#446
From: Paul Murray
Date: Sat, 14 Oct 2000 00:00
24 lines
1556 bytes
"DavidL" <email.address@in.message> wrote in message
news:39e57bc3$1@server.local...
> Hi all,
>
> I have come to java from C++, where when you want to cleanup when a class
is
> destroyed you would write a destructor.
>
> I am having trouble getting the same functionailty from java.
>
> From what I have read, I understood that this was the function of the
> "finalize" method.
> However, I don't seem to be able to get it to work.
>

Java does not guarrintee that finalize gets called, although there is a flag
you can set that will actually do this. rather than handling clean-up as a
side effect of memory management, you will need to clean up your classes
expicitly.

--------------------------------------------------------------
Repent! Quit your job! Slack off!
http://www.users.bigpond.com/pmurray
ICQ: 26066755
Technical Details
Message-ID: <KF6G5.2076$e5.5251@newsfeeds.bigpond.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39e57bc3$1@server.local>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,d25b87a070be9251
X-Google-Attributes: gid10d6db,public
From: "Paul Murray" <pmurray@nospam.bigpond.com>
Subject: Re: How to cleanup when a class is destroyed ?
Date: 2000/10/14
Message-ID: <KF6G5.2076$e5.5251@newsfeeds.bigpond.com>
X-Deja-AN: 681539760
References: <39e57bc3$1@server.local>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
X-Trace: newsfeeds.bigpond.com 971568874 139.134.124.220 (Sun, 15 Oct 2000 10:14:34 EST)
Organization: Telstra BigPond Internet Services (http://www.bigpond.com)
X-MSMail-Priority: Normal
NNTP-Posting-Date: Sun, 15 Oct 2000 10:14:34 EST
Newsgroups: aus.computers.java