Static Public Member Functions

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.


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