Java

Out Of Memory Error: Java Heap Space - PreparedStatement


程序跑了约20~50笔SQL后,发生了Out Of Memory Error: Java Heap Space

程序死在下面这段叙述

conn.prepareStatement(sql);

发现,只要我close 了PrepareStatement,不只性能也变好了,也可以解决Out Of Memory Errror的问题。

参考网址:

https://stackoverflow.com/questions/32511190/out-of-memory-error-java-heap-space-preparedstatement-mysql