Re: patch: add a finalizer to AbstractJdbc1Statement - Mailing list pgsql-jdbc

From Paul Thomas
Subject Re: patch: add a finalizer to AbstractJdbc1Statement
Date
Msg-id 20030818113822.A20497@bacon
Whole thread Raw
In response to patch: add a finalizer to AbstractJdbc1Statement  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: patch: add a finalizer to AbstractJdbc1Statement
List pgsql-jdbc
On 17/08/2003 15:00 Oliver Jowett wrote:
> 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.

Not a good solution IMHO. Relying on GC to clean up resource leaks is a
poor solution. And it you simply System.exit() the JVM, GC is not called
at all.

regards

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: [BUGS] Bug #926: if old postgresql.jar in CLASSPATH,
Next
From: "Alexander V. Morokhovets"
Date:
Subject: Re: Strange executing batch