How to implement garbage collection in C++

前端 未结 6 1354
攒了一身酷
攒了一身酷 2020-12-12 10:15

I saw some post about implement GC in C and some people said it\'s impossible to do it because C is weakly typed. I want to know how to implement GC in C++.

I want s

6条回答
  •  甜味超标
    2020-12-12 11:15

    The claim you saw is false; the Boehm collector supports C and C++. I suggest reading the Boehm collector's documentation (particularly this page)for a good overview of how one might write a garbage collector in C or C++.

提交回复
热议问题