Smart Pointers

Why?
1. Because C++ has no garbage collector by default.
2. Sometimes it's difficult to define who is actually responsible for deleting an object not in use anymore.

How?
By using shared smart pointers from the Boost library objects gets deleted when no-one has an reference to the object anymore (ref. count = 0).

Where? In OpenEngine smart pointers are used especially for small object which is being thrown around in the engine making it difficult to place responsibility for deletion. For example the Face representation which is only representing a single triangle, is being used by a variety of modules each frame.
Smart pointers wrapping pointer to a type, are by default declared as a type in the corresponding .h file (see openengine/src/Geometry/Face.h)

//! Smart pointer to a face object.
typedef boost::shared_ptr<Face> FacePtr;

Checkout the following links to familiarize yourself with smart pointers:

 http://www.codeproject.com/vcpp/stl/boostsmartptr.asp
 http://ootips.org/yonat/4dev/smart-pointers.html