freeMemory

public static void fullGC(){
Runtime rt = Runtime.getRuntime();
long isFree = rt.freeMemory();
long wasFree ;
do{
  wasFree = isFree;
  rt.runFinalization();
  rt.gc();
  isFree = rt.freeMemory();
}while(isFree > wasFree);
}

posted on 2007-05-16 21:41 巩伟 阅读(134) 评论(0)  编辑  收藏 所属分类: J2SE

导航

<2026年3月>
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

统计

留言簿

随笔分类

文章分类

文章档案

搜索

最新评论