RE: finalize in LargeObject

From: Joe Shevland <J(dot)Shevland(at)eclipsegroup(dot)com(dot)au>
To: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, Philip Crotwell <crotwell(at)seis(dot)sc(dot)edu>
Cc: PostgreSQL jdbc list <pgsql-jdbc(at)postgresql(dot)org>
Subject: RE: finalize in LargeObject
Date: 2001-05-16 03:55:49
Message-ID: C56487636E5CD4119B1E00D0B789098ADA29CE@MEL-EXCH1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I can't see it hurting, it'll mean that when the object is no longer
referenced and garbage collected, the (is it a stream?) will get closed. I
would have thought it will only be useful in an error condition where the LO
didn't already get 'closed()', as I think close() should occur elsewhere and
in the finalize() only as a general safety net.

However I haven't looked at the code, or the calling code; Peter M. may shed
more light on the subject.

Cheers,
Joe

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> Sent: Wednesday, 16 May 2001 1:51 PM
> To: Philip Crotwell
> Cc: PostgreSQL jdbc list
> Subject: Re: [JDBC] finalize in LargeObject
>
>
>
> Can someone comment on this please?
>
> >
> > Hi
> >
> > Shouldn't there be a
> >
> > protected void finalize() {
> > close();
> > }
> >
> > in LargeObject.java so that the db resources are released when it is
> > garbage collected or am I missing something?
> >
> > thanks,
> > Philip
> >
> >
> >
> >
> >
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to
> majordomo(at)postgresql(dot)org)
> >
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> + If your life is a hard drive, | 830 Blythe Avenue
> + Christ can be your backup. | Drexel Hill,
> Pennsylvania 19026
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo(at)postgresql(dot)org
>

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dickson, John 2001-05-16 03:58:02 RE: finalize in LargeObject
Previous Message Bruce Momjian 2001-05-16 03:50:41 Re: finalize in LargeObject