This is the mail archive of the java-patches@gcc.gnu.org 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]
Other format: [Raw text]

RE: [PATCH]: natThread.cc: Destroy join sync objects in finalizer


> -----Original Message-----
> From: Bryce McKinlay [mailto:mckinlay@redhat.com]
> Sent: Sunday, September 12, 2004 12:31 PM
> To: tromey@redhat.com
> Cc: Hans Boehm; gnustuff@thisiscool.com; GCJ Patches
> Subject: Re: [PATCH]: natThread.cc: Destroy join sync objects in
> finalizer
> 
> 
> Tom Tromey wrote:
> 
> >Hans> In this case, is it possible to invoke the cleanup code from
> >Hans> a java.lang.Thread finalizer?  Is java.lang.Thread 
> allowed to have
> >Hans> a finalizer?
> >
> >It can have a finalizer, but user code can override it.  So, there's
> >no guarantee it will be run.
> >
There is no guarantee.  But if it's not, I think that's a client bug.  The
general rule in Java seems to be that if you inherit from a class and define
a finalizer, then you should invoke the superclass finalizer when you finish.

It's probably better if we don't leak resources in that case, but I'm not sure
it qualifies as a libgcj bug if we do.

Hans


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