ZThread::LazyInstantiation Class Reference

#include <Singleton.h>

List of all members.

Static Protected Member Functions

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


Detailed Description

Author:
Eric Crahen <http://www.code-foo.com>
Date:
<2003-07-16T17:57:45-0400>
Version:
2.2.0
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

template<class T>
static void ZThread::LazyInstantiation::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.

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


The documentation for this class was generated from the following file:
Generated on Wed Aug 30 03:27:48 2006 for SWG EMU by  doxygen 1.4.7