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 巩伟 阅读(147) 评论(0)  编辑  收藏 所属分类: J2SE

导航

<2026年9月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

统计

留言簿

随笔分类

文章分类

文章档案

搜索

最新评论