首页 | 本学科首页   官方微博 | 高级检索  
     

Java软引用防止内存泄漏技术的研究
引用本文:张昊,潘祖烈. Java软引用防止内存泄漏技术的研究[J]. 安徽教育学院学报, 2006, 24(6): 42-45
作者姓名:张昊  潘祖烈
作者单位:1. 安徽城市管理职业学院,安徽,合肥,230602
2. 解放军电子工程学院,安徽,合肥,230037
摘    要:GC自动地进行内存管理,但长时间对象强引用而忘了释放,可能导致内存泄漏,软引用有较强的引用功能,在程序中申请内存时,GC自动判断是否处于软可及状态的对象。当内存不够时才回收这些由软引用的对象,从而保证了内存不溢出。

关 键 词:软引用  内存管理  对象状态  内存泄漏
文章编号:1001-5116(2006)06-0042-04
收稿时间:2006-05-20
修稿时间:2006-05-20

Study on the Technology of Preventing Memory Loss by Soft Reference
ZHANG Hao,PAN Zu-lie. Study on the Technology of Preventing Memory Loss by Soft Reference[J]. Journal of Anhui Institute of Education, 2006, 24(6): 42-45
Authors:ZHANG Hao  PAN Zu-lie
Affiliation:1. Anhui Vocational College of City Management, Hefei 231202 2. Electronic Engineering Academy of PLA , Hef ei 230037, China
Abstract:Though GC can manage internal storage automatically, it can cause internal memory leakage when it is used for long time without being released.GC can judge if the object is in soft and reachable state when applying for internal memory.The soft-using object will be called back until the internal memory is inadequate,which will stop internal memory not leaking out.
Keywords:soft reference  memory objective  internal memory loss  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号