Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How will be implemented minimal garbage collection support in a future C++1x?

I've just seen Herb Sutter's presentation Future C++ and there was mentioned that he and some other people work on the garbage collection proposal.Straustrup has already mentioned several reasons for minimal garbage collection support. I've also found one: http://c2.com/cgi/wiki?AlgorithmsThatDemandGarbageCollection I tried to google information about the implementation details of future garbage collection, but found only old proposals (2005-2007) accordingly to them garbage collection will be implemented via special kind of pointers (something similar to C++\CLI and C++\CX I guess). But nevertheless what is now?

Can somebody clearify for me this. What kind of garbage collection will be in a future C++? Links to some useful and new articles and proposals with technical details will be appreciated and very helpful!

like image 939
Oleksandr Karaberov Avatar asked Nov 04 '12 23:11

Oleksandr Karaberov


1 Answers

The standard will not "implement garbage collection". It will describe the interaction of a conforming C++ program with a garbage collector. In particular, the existing wording that, as far as I remember, was already in the working draft for C++0x, described what safely derived pointers are (that is which pointers the garbage collector can find), it said that garbage collection is optional, and that it does not call destructors. It did not add any new kind of pointers.

EDIT: the N2960 draft had this wording in it. You can do binary search to find the latest version.

like image 174
Yakov Galka Avatar answered Oct 18 '22 19:10

Yakov Galka