English 中文(简体)
删除java的整部《商业合同》。
原标题:Deleting the whole BST in java

我审视了瓦 Java的低温分解法的实施情况,以及整个树木需要删除(例如,使用<代码>clear(<>clear(>)功能)时,全方位通过整个树冠以“null为参考。 我很想知道,如果仅仅把树木的根基点确定为无效,那么垃圾收集器是否能够收集分配给树木的所有记忆,因为在根基被确定为无效之后,不会有对 no的活 references? 如果做这项工作,则要多管垃圾收集器才能收集整个树木?

最佳回答

我很想知道, j瓦的垃圾收集器是否能够收集分配给树木的所有记忆,如果仅仅把树木的根基点定为无效,而没有规定每个单点的“无效”,因为在根子被确定为无效之后,不会活着地提及 no?

Yes. When the last live external reference to a network of nodes is removed, all of the nodes are eligible for garbage collection. This sounds like what you are describing.

如果能够收集树木的记忆,它会使用多块垃圾收集器穿过每层树木?

简而言之,停车场收集器可将其全部删除。 在任何使用标识的垃圾收集器(而不是参考值)中,垃圾收集器不必绕过停车场的物体网络。 相反,它渗透和标志NON-garbage物体,并将它标记的物体作为垃圾处理。

In practice, sophisticated garbage collectors partition the heap into spaces (e.g. a new generation and one or more old generations) and can garbage collect (at least) some of them independently. If your tree s nodes have been migrated to an older generation space, then it could take more than one "cycle" of the GC to delete them all. However, there s not much you can do about this ... and you shouldn t care about it anyway.

问题回答

The garbage collector will be able to reclaim the memory of the whole tree once there are no references to any of the nodes of the tree. If no references exist to the root node but an accessible reference still exists to a child node, then the tree can not be removed from memory.

• 想象垃圾收集器如何运作。 它从各种来源(统计、全球、范围变量等)积累了所有可获取记忆的图表。 仍然可以得到的任何记忆都无法收回。 如果仍然可以找到单一标准,那么从中可以获取的任何东西也无法收回(大多数执行《商业法》条款的人都可以进入母子。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签