patch: add a finalizer to AbstractJdbc1Statement

Поиск
Список
Период
Сортировка
От Richard DeGrande
Тема patch: add a finalizer to AbstractJdbc1Statement
Дата
Msg-id sf439eca.064@gc6.jefferson.co.us
обсуждение исходный текст
Список pgsql-jdbc
This patch adds a finalizer to AbstractJdbc1Statement that closes the
statement. Without this, when server-side preparation is in use
statements
that are executed then discarded without an explicit close() will leak
resources on the backend while that connection remains open, as a
DEALLOCATE
never gets executed.

Objects with a finalizer are more expensive to create (depending on the
VM).
If it's too much of a price to pay in the general case, there's
another
approach that uses phantom references and only pays the cost when
backend
resources are actually allocated, but the code becomes much more
complex.

-O

Вложения

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

Предыдущее
От: "Waldomiro"
Дата:
Сообщение: FETCH and MOVE
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: FETCH and MOVE