Why doesn’t C++ have a garbage collector?

I’m not asking this question because of the merits of garbage collection first of all. My main reason for asking this is that I do know that Bjarne Stroustrup has said that C++ will have a garbage collector at some point in time.

With that said, why hasn’t it been added? There are already some garbage collectors for C++. Is this just one of those “easier said than done” type things? Or are there other reasons it hasn’t been added (and won’t be added in C++11)?

Cross links:

  • Garbage collectors for C++

Just to clarify, I understand the reasons why C++ didn’t have a garbage collector when it was first created. I’m wondering why the collector can’t be added in.

16 Answers
16

Leave a Comment