If you can read this text, it means you are not experiencing this website at its best. This website is designed for used with a standards-compliant browser.
Current version: 2.3.2
A platform-independent, multi-threading and synchronization library for C++
Home Documentation Downloads CVS Contact

LazyInstantiation Class Reference

#include <Singleton.h>

List of all members.

Static Protected Member Functions

template<class T>
void create (T *&ptr)

Detailed Description

Eric Crahen <http://www.code-foo.com>
The LazyInstantiation policy allows the creation and lifetime of an instance of a particular type to be managed using dynamic allocation and a singleton destroyer. This will abide by the standard C++ rules for static objects lifetimes.

Member Function Documentation

void create T *&  ptr  )  [inline, static, protected]

Create an instance of an object, using new, that will be destroyed when an associated Destroyer object (allocated statically) goes out of scope.

ptr reference to location to receive the address of the allocated object

The documentation for this class was generated from the following file: