Pergunta de entrevista da empresa Morgan Stanley

what is smart pointer?

Resposta da entrevista

Sigiloso

12 de mar. de 2013

"Smart Point" is point like object whoes destructor automatically calls delete, like std::auto_ptr. std::tr1::shared_ptr is another kind of smart pointer which counts the references to the object automatically, and it is also called reference-counting smart pointer. std::tr1::shared_ptr is preferred than std::auto_ptr because it allows more than one pointer pointing to one object.