a template singleton More...
#include <singleton.h>
Static Public Member Functions | |
static T * | Get (void) |
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.
|
static |
Definition at line 50 of file singleton.h.
Referenced by ns3::TypeId::AddAttribute(), ns3::TypeId::AddTraceSource(), ns3::Config::Connect(), ns3::Config::ConnectWithoutContext(), ns3::Config::Disconnect(), ns3::Config::DisconnectWithoutContext(), ns3::TypeId::DoAddConstructor(), ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::GetConstructor(), ns3::TypeId::GetGroupName(), ns3::TypeId::GetHash(), ns3::TypeId::GetName(), ns3::TypeId::GetParent(), ns3::TypeId::GetRegisteredN(), ns3::Config::GetRootNamespaceObject(), ns3::Config::GetRootNamespaceObjectN(), ns3::TypeId::GetTraceSource(), ns3::TypeId::GetTraceSourceN(), ns3::TypeId::HasConstructor(), ns3::TypeId::HasParent(), ns3::TypeId::HideFromDocumentation(), ns3::TypeId::LookupByHash(), ns3::TypeId::LookupByHashFailSafe(), ns3::TypeId::LookupByName(), ns3::TypeId::LookupByNameFailSafe(), ns3::Config::LookupMatches(), ns3::TypeId::MustHideFromDocumentation(), ns3::Config::RegisterRootNamespaceObject(), ns3::Config::Set(), ns3::TypeId::SetAttributeInitialValue(), ns3::TypeId::SetGroupName(), ns3::TypeId::SetParent(), ns3::TypeId::TypeId(), and ns3::Config::UnregisterRootNamespaceObject().