in c++11, we have shared_ptr
and when we use it together with the new
, we won't have to explicitly call delete
later. this part of job has been taken care of by shared_ptr
instead.
with that being said, why ppl keep saying there is no garbage collector in c++?
what is missing over here?
can i use / think of shared_ptr
as garbage collector in c++?