Re: closing statements when connection is closed - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: closing statements when connection is closed
Date
Msg-id 4028DBFB.6010701@opencloud.com
Whole thread Raw
In response to Re: closing statements when connection is closed  (Dave Cramer <pg@fastcrypt.com>)
Responses Re: closing statements when connection is closed  (Dave Cramer <pg@fastcrypt.com>)
Re: closing statements when connection is closed  (Barry Lind <blind@xythos.com>)
List pgsql-jdbc
Dave Cramer wrote:
> In the JDBC API Tutorial and Reference, it suggests that driver
> implementors assume the worst, so I think that we should attempt to
> clean up our clients connections as best we can.

Sure. It just seems like a fair amount of work to support a case where
we will leak memory regardless of what the driver does. The client is
keeping the Statement/ResultSet alive, there's nothing the driver can do
to cause GC of that object, at best all we can do is reduce the
footprint of the leaked objects. Is doing this worth the extra
complexity in the driver? It doesn't look like a common error to me..

> On Mon, 2004-02-09 at 23:33, Oliver Jowett wrote:
>>As far as I can see the only additional thing we'd be able to clean up
>>is clearing the reference to row data held by open ResultSet objects.
>>This is only going to have an effect if something outside the driver is
>>holding references to the ResultSet or Statement after closing the
>>connection -- which seems like an application bug to me.

-O

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Pl/Java 1.0.0.b now avaiable on Linux 386 and Cygwin
Next
From: Dave Cramer
Date:
Subject: Re: closing statements when connection is closed