67,515
社区成员
发帖
与我相关
我的任务
分享
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
gpsConnection = DriverManager.getConnection("地址", "用户名","密码");
gpsPS = (PreparedStatement) gpsConnection.prepareStatement(gpsSQL);
gpsConnection.setAutoCommit(false);
,因为是批量存储,所以gpsPS 和gpsConnection 始终没关闭,等到下一轮存储的时候,还执行上面的连接代码,应该是把gpsPS 和gpsConnection覆盖了吧,那前一轮的gpsPS 和gpsConnection会释放吗?现在压力是存储2000条没问题,4000条内存蹭蹭往上涨,是这个原因吗?