Pregunta de entrevista de Morgan Stanley

what is smart pointer?

Respuesta de la entrevista

Anónimo

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.