在 finally 块中将实例设为孤儿请求 GC 以高优先级执行垃圾收集吗?
SQLConnect ds =null;
Connection con = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
...
variables
try {
//Business Logic
} catch(Exception e) {
//Logging goes here
} finally {
//Make instances Orphan
ds = null;
con = null;
pstmt = null;
rs = null;
}