postgresql-jdbc.git / summary / log / commit / refs
commit 28efbc4a70326906f2e2b42746126ca3731a4ea2
Author: Kris Jurka <books@ejurka.com>
Date: Thu Mar 29 03:13:15 2007 +0000
Review changes to fix the refcursor memory leak problem. The change
deletes additional code that has nothing to do with refcursors, but
instead is related to the setFetchSize partial fetch code.
org/postgresql/jdbc2/AbstractJdbc2ResultSet.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java b/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
index 159edbcb..cca70ecf 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
@@ -3,7 +3,7 @@
* Copyright (c) 2003-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
-* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java,v 1.90 2007/02/19 06:00:24 jurka Exp $
+* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java,v 1.91 2007/03/02 01:27:55 davec Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1840,7 +1840,10 @@ public abstract class AbstractJdbc2ResultSet implements BaseResultSet, org.postg
{
//release resources held (memory for tuples)
rows = null;
-
+ if (cursor != null) {
+ cursor.close();
+ cursor = null;
+ }
}
public boolean wasNull() throws SQLException
[parent: e81a61082e85]