🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #885

Re: Does the destructor allways run

#885
From: Paul Murray
Date: Fri, 14 Apr 2000 00:00
20 lines
1435 bytes
"Per Petersson" <pt98ppe@student.hk-r.se> wrote in message
news:OqmJ4.85$7j.35014@newnews.hk-r.se...
> I've got the impression that the finalize method doesn't run  if the
object
> dies on program termination.
> What I mean is that if I have an object and then do System.exit()
somewhere
> the finalize method of that object doesnt run .
>
> Could someone please say that I'm wrong (or right).


Yes, that's right. Finalizers are not guarinteed to be run. You can call
System.runFinalizersOnExit(true) to force it, but that's a deprecated method
because of security hassles or something.

--
--------------------------------------------------------------
http://www.users.bigpond.com/pmurray
ICQ: 26066755
Technical Details
Message-ID: <0_QJ4.1591$E4.2662@newsfeeds.bigpond.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <OqmJ4.85$7j.35014@newnews.hk-r.se>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,d47246c9f9878080
X-Google-Attributes: gid10d6db,public
From: "Paul Murray" <pmurray@nospam.bigpond.com>
Subject: Re: Does the destructor allways run
Date: 2000/04/14
Message-ID: <0_QJ4.1591$E4.2662@newsfeeds.bigpond.com>
X-Deja-AN: 611377712
References: <OqmJ4.85$7j.35014@newnews.hk-r.se>
X-Priority: 3
X-Mimeole: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Trace: newsfeeds.bigpond.com 955767804 139.134.125.96 (Sat, 15 Apr 2000 13:03:24 EST)
Organization: Telstra BigPond Internet Services (http://www.bigpond.com)
X-MSMail-Priority: Normal
NNTP-Posting-Date: Sat, 15 Apr 2000 13:03:24 EST
Newsgroups: aus.computers.java