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


只有注册用户登录后才能发表评论。


网站导航:
 

导航

<2025年7月>
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

统计

留言簿

随笔分类

文章分类

文章档案

搜索

最新评论