Sollicitatievraag bij Morgan Stanley

what is smart pointer?

Antwoord op sollicitatievraag

Anoniem

12 mrt 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.