开发者

What is the simplest augmentation to reference counting that will collect cycles?

开发者 https://www.devze.com 2023-02-01 13:54 出处:网络
Reference counting alone does not collect cycles but there are additional techniques that can collect cycles as well. What is the simplest such technique?

Reference counting alone does not collect cycles but there are additional techniques that can collect cycles as well. What is the simplest such technique?

I'd like to compare th开发者_Python百科e complexity of augmented referencing counting with tracing GC.


It's better to code be cycle free but in the case of cycles if you want find isolated cycle in graph with E and V, it will takes O(|E| + |V|), It's similar to finding connected component algorithm and then run finding all cycle of graph with BFS, and if you just think about |V| it can be very heavy (in compiled assembly) So It's better to prevent from this, and because of this they left them to developers.

0

精彩评论

暂无评论...
验证码 换一张
取 消