A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::Singleton< T > Class Template Reference

a template singleton More...

#include <singleton.h>

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.


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