System.gc和System.runFinalization区别
2016-02-18 11:16
274 查看
System.gc();
//告诉垃圾收集器打算进行垃圾收集,而垃圾收集器进不进行收集是不确定的
System.runFinalization();
//强制调用已经失去引用的对象的finalize方法
System.gc(); hints the VM that it is probably time to activate the Thread doing to the Garbage Collection. So all the part of this sentence stands in
the hint word. The finalizer are run according to the VM good will, generally speaking. This means they could be run or could not. Invoking the System.runFinalization( ); force the VM to invoke on each instance the finalizer when it Garbage collects the Object
referenced
//告诉垃圾收集器打算进行垃圾收集,而垃圾收集器进不进行收集是不确定的
System.runFinalization();
//强制调用已经失去引用的对象的finalize方法
System.gc(); hints the VM that it is probably time to activate the Thread doing to the Garbage Collection. So all the part of this sentence stands in
the hint word. The finalizer are run according to the VM good will, generally speaking. This means they could be run or could not. Invoking the System.runFinalization( ); force the VM to invoke on each instance the finalizer when it Garbage collects the Object
referenced
相关文章推荐
- ArcGIS教程:地理处理工具参数的数据类型
- 在mac虚拟机中升级win10要注意什么
- CKEditor图片上传实现详细步骤
- MD5和SHA1算法的C++实现和使用
- 01背包问题空间优化
- TCP长连接与短连接的区别(转)
- Nginx 配置文件总结
- 服务器性能诊断
- [BZOJ3531] [SDOI2014] 旅行
- Unity3d,获取GPS定位信息
- Ad Network助力移动DSP突破数据孤岛困境
- MFC环境下Start&Pause&Stop操作(续):尽快结束任务
- iOS 三方app读取苹果健康数据
- java实现读取邮件发送邮件
- SQL Server 跨库同步数据
- 广东程序员在加利福尼亚
- C#读取ini文件的方法
- ThinkPHP项目笔记之RBAC(权限相关视频讲解篇
- React Native 环境搭建攻略
- freemarker从头开始(Maven构建)