Add large object finalization cleanup to the proper java file.
authorBruce Momjian <[email protected]>
Wed, 6 Jun 2001 21:16:09 +0000 (21:16 +0000)
committerBruce Momjian <[email protected]>
Wed, 6 Jun 2001 21:16:09 +0000 (21:16 +0000)
src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java

index 20afda578288d6c2a0f0c0624122871ee8aa43e5..677d853bb57eb1793aa6983f29fc96b0a3b9f607 100644 (file)
@@ -89,6 +89,12 @@ public class LargeObject
     this.fd = fp.getInteger("lo_open",args);
   }
 
+  /* Release large object resources during garbage cleanup */
+  protected void finalize() throws SQLException
+  {
+    close();
+  }
+
   /**
    * @return the OID of this LargeObject
    */