本文介绍了垃圾收集器使用托管堆和根来创建对象garph的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 当垃圾收集器开始运行时,它会假设堆中的所有对象都是垃圾。换句话说,它假定应用程序的根中没有一个引用堆中的任何对象。现在,垃圾收集器开始遍历根并构建一个可以从根到达的所有对象的图形。 整个过程的根源是什么?When the garbage collector starts running, it makes the assumption that all objects in the heap are garbage. In other words, it assumes that none of the application's roots refer to any objects in the heap. Now, the garbage collector starts walking the roots and building a graph of all objects reachable from the roots.What are the roots in this whole process???推荐答案 这篇关于垃圾收集器使用托管堆和根来创建对象garph的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!