关于JVM内存清理的问题
程序中存在内存泄漏,用Jprobe分析时发现一个问题
程序有个静态的哈希表:
public static HashMap<String, StudentVO> ccHashMap = new HashMap<String, StudentVO>();
我在ccHashMap中put了1000条记录,然后挨个remove掉。
我用Jprobe观察发现JVM中一直存在1000条StudentVO,Heap Count:1000。
尝试ccHashMap每次remove掉一条记录后调用System.gc();再用Jprobe观察就没有了。
请教这个地方是导致内存泄漏的地方吗?StudentVO为什么没有被自动回收掉?