java - TiJ4th 提到 detached self-referential groups 不会被GC发现,为什么?
阿神
阿神 2017-04-18 10:11:25
[Java讨论组]

In faster schemes, garbage collection is not based on reference counting.
Instead, it is based on the idea that any non-dead object must ultimately be traceable back to a reference that lives either on the stack or in static storage. The chain might go through several layers of objects.
Thus, if you start in the stack and in the static storage area and walk through all the references, you’ll find all the live objects.
For each reference that you find, you must trace into the object that it points to and then follow all the references in that object, tracing into the objects they point to, etc., until you’ve moved through the entire Web that originated with the reference on the stack or in static storage.
Each object that you move through must still be alive. Note that there is no problem with detached self-referential groups—these are simply not found, and are therefore automatically garbage.

最后提到 detached self-referential groups 不会被gc发现是为什么呢?按照从stack and static storage出发应该会经过这些自参照(self-referential)的引用。其中说到的`chain也不是很理解,感觉太突兀了,希望有所了解的人可以帮助一下我。万分感谢!

阿神
阿神

闭关修行中......

全部回复(1)
PHP中文网

都说了是detached的了,难道不是detached from stack and detached from static storage吗?

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号