可能重复:
为什么空Java程序消耗内存?
为什么绝对空的Java应用程序会不断消耗内存?该应用程序:
public class Dummy {
public static void main(String[] args) throws IOException {
System.in.read();
}
}
Run Code Online (Sandbox Code Playgroud)
甚至:
public class Dummy {
public static void main(String[] args) throws InterruptedException {
synchronized (Thread.currentThread()) {
Thread.currentThread().wait();
}
}
}
Run Code Online (Sandbox Code Playgroud)
堆状态:

更新:IOException修复.
| 归档时间: |
|
| 查看次数: |
170 次 |
| 最近记录: |