Re: patch: add a finalizer to AbstractJdbc1Statement

From: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
To: "pgsql-jdbc (at) postgresql (dot) org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: patch: add a finalizer to AbstractJdbc1Statement
Date: 2003-08-18 10:38:22
Message-ID: 20030818113822.A20497@bacon
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 |
+------------------------------+---------------------------------------------+

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Alexander V. Morokhovets 2003-08-18 10:45:07 Re: Strange executing batch
Previous Message Dave Cramer 2003-08-18 01:55:16 Re: [JDBC] Bug #926: if old postgresql.jar in CLASSPATH,