Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can garbage collection be done in C++ with an add-on library?

0
Posted

Can garbage collection be done in C++ with an add-on library?

0

Yes, I use one myself. It isn’t part of the language, though, and requires some subverting of the language to make it work. Using gc with C++ isn’t for the standard or casual C++ programmer. Building it into the language, like in D, makes it practical for everyday programming chores. GC isn’t that hard to implement, either, unless you’re building one of the more advanced ones. But a more advanced one is like building a better optimizer – the language still works 100% correctly even with a simple, basic one. The programming community is better served by multiple implementations competing on quality of code generated rather than by which corners of the spec are implemented at all.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123