comp.lang.ada
 help / color / mirror / Atom feed
From: Geoff Bull <geoff@research.canon.com.au>
Subject: Re: Dummy
Date: 2000/02/10
Date: 2000-02-10T01:22:21+00:00	[thread overview]
Message-ID: <38A212E8.C5552776@research.canon.com.au> (raw)
In-Reply-To: 87jghc$oj5$3@wanadoo.fr

Jean-Pierre Rosen wrote:
> 
> Robert A Duff <bobduff@world.std.com> a �crit dans le message :
> wcc66w4rcy5.fsf@world.std.com...
> > Florian Weimer <someone@deneb.cygnus.argh.org> writes:
> >
> > > Does this mean that that the finalization of local variables is
> > > non-deterministic in Java?  Ugh.
> >
> > Yes.  Finalization happens in Java whenever the garbage collector gets
> > around to noticing that it's needed.
> >
> It's even worse. The finalization routine is allowed to resurect the object
> (for example, by assigning it to some live variable), however it is
> guaranteed that in that case, finalization will *not* be invoked again, when
> the object becomes inaccessible for the second time.

It's even worse, although finalizers in Java are guaranteed to be never
invoked more than once, the are not guaranteed to be invoked at least
once.
This makes finalizers essentially useless for cleaning up resources etc.
It used to be possible to ask the VM to run finalizers at exit, but that
method has been deprecated.




  reply	other threads:[~2000-02-10  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-02  0:00 Dummy Simic_10111
     [not found] ` <3898C380.BC01EC03@earthlink.net>
2000-02-03  0:00   ` Dummy Hyman Rosen
2000-02-03  0:00     ` Dummy Larry Kilgallen
2000-02-03  0:00       ` Dummy Hyman Rosen
2000-02-03  0:00         ` Dummy Larry Kilgallen
2000-02-03  0:00     ` Dummy Gautier
2000-02-03  0:00       ` Dummy Hyman Rosen
2000-02-03  0:00     ` Dummy Tucker Taft
2000-02-04  0:00       ` Dummy Florian Weimer
2000-02-04  0:00         ` Dummy Robert A Duff
2000-02-05  0:00           ` Dummy Jean-Pierre Rosen
2000-02-10  0:00             ` Geoff Bull [this message]
2000-02-07  0:00         ` Dummy Hyman Rosen
2000-02-07  0:00           ` Dummy Florian Weimer
2000-02-07  0:00             ` Dummy Hyman Rosen
2000-02-04  0:00       ` Dummy Robert A Duff
     [not found] ` <389c50a6.14707859@news.flash.net>
2000-02-04  0:00   ` Dummy Marin D. Condic
  -- strict thread matches above, loose matches on Subject: below --
2000-01-11  0:00 Dummy Simic_10111
2000-01-11  0:00 ` Dummy Gautier
2000-01-11  0:00 ` Dummy Ehud Lamm
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox