diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/PreparedStatement.java b/src/interfaces/jdbc/org/postgresql/jdbc1/PreparedStatement.java
index 237a58486d8d77e26c7bddc8ba57598dc24fcb63..51cb64d5a218e9893990c864da73dac9c14705fe 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/PreparedStatement.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/PreparedStatement.java
@@ -164,7 +164,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setByte(int parameterIndex, byte x) throws SQLException
 	{
-		set(parameterIndex, (new Integer(x)).toString());
+		set(parameterIndex, Integer.toString(x));
 	}
 
 	/**
@@ -177,7 +177,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setShort(int parameterIndex, short x) throws SQLException
 	{
-		set(parameterIndex, (new Integer(x)).toString());
+		set(parameterIndex, Integer.toString(x));
 	}
 
 	/**
@@ -190,7 +190,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setInt(int parameterIndex, int x) throws SQLException
 	{
-		set(parameterIndex, (new Integer(x)).toString());
+		set(parameterIndex, Integer.toString(x));
 	}
 
 	/**
@@ -203,7 +203,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setLong(int parameterIndex, long x) throws SQLException
 	{
-		set(parameterIndex, (new Long(x)).toString());
+		set(parameterIndex, Long.toString(x));
 	}
 
 	/**
@@ -216,7 +216,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setFloat(int parameterIndex, float x) throws SQLException
 	{
-		set(parameterIndex, (new Float(x)).toString());
+		set(parameterIndex, Float.toString(x));
 	}
 
 	/**
@@ -229,7 +229,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setDouble(int parameterIndex, double x) throws SQLException
 	{
-		set(parameterIndex, (new Double(x)).toString());
+		set(parameterIndex, Double.toString(x));
 	}
 
 	/**
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
index e9fc53d96a85bec33dd6fda20557fdff34ebf5f1..3010ed59a3fbc98e478686d352dc5217e579e419 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
@@ -127,7 +127,8 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
    */
   public void close() throws SQLException
   {
-    // No-op
+    //release resources held (memory for tuples)
+    rows.setSize(0);
   }
   
   /**
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java b/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
index a74d3c57b3cc3a637368b2e0f6aea9598ac7dc57..1e8ec1138ea8f10da6a51c5ed024deafb4f09520 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
@@ -164,7 +164,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setByte(int parameterIndex, byte x) throws SQLException
 	{
-		set(parameterIndex, (new Integer(x)).toString());
+		set(parameterIndex, Integer.toString(x));
 	}
 
 	/**
@@ -177,7 +177,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setShort(int parameterIndex, short x) throws SQLException
 	{
-		set(parameterIndex, (new Integer(x)).toString());
+		set(parameterIndex, Integer.toString(x));
 	}
 
 	/**
@@ -190,7 +190,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setInt(int parameterIndex, int x) throws SQLException
 	{
-		set(parameterIndex, (new Integer(x)).toString());
+		set(parameterIndex, Integer.toString(x));
 	}
 
 	/**
@@ -203,7 +203,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setLong(int parameterIndex, long x) throws SQLException
 	{
-		set(parameterIndex, (new Long(x)).toString());
+		set(parameterIndex, Long.toString(x));
 	}
 
 	/**
@@ -216,7 +216,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setFloat(int parameterIndex, float x) throws SQLException
 	{
-		set(parameterIndex, (new Float(x)).toString());
+		set(parameterIndex, Float.toString(x));
 	}
 
 	/**
@@ -229,7 +229,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
 	 */
 	public void setDouble(int parameterIndex, double x) throws SQLException
 	{
-		set(parameterIndex, (new Double(x)).toString());
+		set(parameterIndex, Double.toString(x));
 	}
 
 	/**
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
index b84537fb4532f28984956b17657ddbc75464d2ef..f1f333d6d2fb42307e07a99d544d349a5a0f211d 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
@@ -128,7 +128,8 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
    */
   public void close() throws SQLException
   {
-    // No-op
+    //release resources held (memory for tuples)
+    rows.setSize(0);
   }
   
   /**