ns3::Singleton< T > Class Template Reference

a template singleton More...

#include <singleton.h>

List of all members.

Static Public Member Functions

static T * Get (void)

Detailed Description

template<typename T>
class ns3::Singleton< T >

a template singleton

This template class can be used to implement the singleton pattern. The underlying object will be destroyed automatically when the process exits. Note that, if you call Singleton::Get again after the object has been destroyed, the object will be re-created which will result in a memory leak as reported by most memory leak checkers. It is up to the user to ensure that Singleton::Get is never called from a static variable finalizer.

Definition at line 37 of file singleton.h.


Member Function Documentation

template<typename T >
T * ns3::Singleton< T >::Get ( void   )  [inline, static]

Definition at line 50 of file singleton.h.


The documentation for this class was generated from the following file:
Generated on Thu Dec 3 14:10:34 2009 for NS-3 by  doxygen 1.6.3