RE: finalize in LargeObject

Поиск
Список
Период
Сортировка
От Dickson, John
Тема RE: finalize in LargeObject
Дата
Msg-id A72970A71811D111960000A0C96ECB2AD6F0D3@aquarius.powerplus.com.au
обсуждение исходный текст
Ответ на finalize in LargeObject  (Philip Crotwell <crotwell@seis.sc.edu>)
Ответы RE: finalize in LargeObject
Список pgsql-jdbc

> From: Bruce Momjian [mailto:pgman@candle.pha.pa.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@pplus.com.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.

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: finalize in LargeObject
Следующее
От: Joe Shevland
Дата:
Сообщение: RE: finalize in LargeObject