C++ 中的垃圾收集库

2022-01-16 00:00:00 garbage-collection libraries c++

哪些免费和商业垃圾收集库可用于 C++,它们各自的优缺点是什么?

What free and commercial garbage collection libraries are available for C++, and what are the pros and cons of each?

我感兴趣的是从该领域的实际使用中来之不易的经验教训,而不是营销或促销宣传.

I am interested in hard-won lessons from actual use in the field, not marketing or promotional blurb.

无需详细说明与自动垃圾收集相关的通常权衡,但请务必提及使用的算法(引用计数、标记和清除、增量等)并简要总结后果.

There is no need to elaborate on the usual trade offs associated with automatic garbage collection, but please do mention the algorithms used (reference counting, mark and sweep, incremental, etc.) and briefly summarise the consequences.

推荐答案

我用过 Boehm 收集器 in成功的过去.它是开源的,可用于商业软件.

I have used the Boehm collector in the past with good success. It's open source and can be used in commercial software.

它是一种保守的收集器,由垃圾收集技术领域最重要的研究人员之一开发的历史悠久.

It's a conservative collector, and has a long history of development by one of the foremost researchers in garbage collection technology.

相关文章