RE: finalize in LargeObject

From: "Dickson, John" <JohnD(at)pplus(dot)com(dot)au>
To: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: RE: finalize in LargeObject
Date: 2001-05-16 03:58:02
Message-ID: A72970A71811D111960000A0C96ECB2AD6F0D3@aquarius.powerplus.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> > 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?

Without knowing the implementation details, I'd at least say that you should
never rely on finalizers being run to release resources - they're not event
guaranteed to run at all, let alone within a reasonable time.

Cheers ...................... JohnD

------------------------------------------------------------------------
John Dickson - Java developer - PowerPlus Australia
johnd(at)pplus(dot)com(dot)au Ph 07-3367 0533
------------------------------------------------------------------------

NOTICE - The information in this e-mail and any attachments is confidential
and is intended for the addressee only. Reading, copying, disclosure or use
by anybody else is not authorised. The contents do not represent the opinion
of PowerPlus or any of its affiliates except to the extent that it relates
to their official business. If you are not the intended recipient, please
delete this message and any attachments and advise the sender by return
e-mail.

Virus protection is in place at PowerPlus, however virus protection remains
the responsibility of the recipient.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2001-05-16 04:08:50 Re: PATCH to org/postgresql/jdbc2/DatabaseMetaData.java
Previous Message Joe Shevland 2001-05-16 03:55:49 RE: finalize in LargeObject