2006-02-06

C++ | What are Smart Pointers Anyway ?

Smart pointers are objects which store pointers to dynamically allocated (heap) objects. They behave much like built-in C++ pointers except that they automatically delete the object pointed to at the appropriate time.

Conceptually, smart pointers are seen as owning the object pointed to, and thus responsible for deletion of the object when it is no longer needed.

Smart Pointers (currently Boost Smart Pointers), are expected to make their way to the C++ Standard. You can find all relevant details at http://boost.org/libs/smart_ptr/smart_ptr.htm

0 Comments:

Post a Comment

<< Home