Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb693704

Browse files
committed
protected void finalize() {
close();}in LargeObject.java so that the db resources are released when it isgarbage collected or am I missing something?Philip Crotwell
1 parenteeaa497 commitb693704

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎src/interfaces/jdbc/org/postgresql/largeobject/LargeObjectManager.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,15 @@ public LargeObjectManager(org.postgresql.Connection conn) throws SQLException
120120
res.close();
121121
DriverManager.println("Large Object initialised");
122122
}
123-
123+
124+
/*
125+
* Added to free resources during garbage collection,
126+
* Philip Crotwell <crotwell@seis.sc.edu>
127+
*/
128+
protectedvoidfinalize() {
129+
close();
130+
}
131+
124132
/**
125133
* This opens an existing large object, based on its OID. This method
126134
* assumes that READ and WRITE access is required (the default).

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp