1. 15
  1.  

  2. 2

    There’s no garbage collector (although C++ allows for one, it is optional, and I’m not aware of any implementations that provide one).

    TIL. Is there anywhere theorizing on what this might look like?

    1. 1

      I believe the idea is that it would work automatically, so code written for garbage-collected C++ would be normal C++ code but without the need to explicitly perform heap deallocations (via delete). A few requirements on pointer manipulation were added to support this and a few library functions were added to handle some special cases, but these would generally not be needed. As I said (I’m the author of the post) I’m not aware of any actual implementations of this. There is no requirement for implementations (compilers & runtime libraries) to support garbage collection.

      This stackoverflow answer has a few more details if you’re still curious: https://stackoverflow.com/a/15157689/388661