Ark Server API (ASE) - Wiki
|
#include <SingletonHolder.h>
Public Member Functions | |
SingletonHolder () | |
~SingletonHolder () | |
S * | get () |
void | reset () |
Deletes the singleton object. | |
Private Attributes | |
S * | _pS |
FastMutex | _m |
This is a helper template class for managing singleton objects allocated on the heap. The class ensures proper deletion (including calling of the destructor) of singleton objects when the application that created them terminates.
Definition at line 29 of file SingletonHolder.h.
|
inline |
Definition at line 37 of file SingletonHolder.h.
|
inline |
Destroys the SingletonHolder and the singleton object that it holds.
Definition at line 43 of file SingletonHolder.h.
|
inline |
Returns a pointer to the singleton object hold by the SingletonHolder. The first call to get will create the singleton.
Definition at line 50 of file SingletonHolder.h.
|
inline |
Deletes the singleton object.
Definition at line 60 of file SingletonHolder.h.
|
private |
Definition at line 70 of file SingletonHolder.h.
|
private |
Definition at line 69 of file SingletonHolder.h.