What is the best cycle diagram representation for Java GC

Or I might ask if the New GC is important?

If so, do you need to manage links between nodes through lookup tables or use weak references (more memory), or just have all nodes point to each other This assumes that I have a "dispose" method in which node or link deletion sets all references to it to null

The question is, if there is a large database in RAM, will it have a significant impact on GC performance if a long random period must be evaluated in the graph? Or not?

Solution

The marking and scanning methods of garbage collection are completely insensitive to the topology of object graph Once it reaches the marked object, it assumes that all its indicators are marked, so no matter how you design the structure, it won't cause much damage

My advice is to try to keep the code as natural as possible, and be very relaxed about any other problems When you encounter a real performance / memory problem, it only occurs when you stop and consider optimization

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>