31 #define __Singleton_H 1
40 #include <feel/feelcore/policy.hpp>
61 typedef T singleton_type;
74 static void makeInstance();
79 static void destroySingleton();
85 typedef singleton_type* instance_type;
86 static instance_type _S_instance;
87 static bool _S_destroyed;
122 feeltime_policy::onDeadReference();
123 _S_destroyed =
false;
126 _S_instance = creation_policy::create();
127 feeltime_policy::scheduleDestruction( _S_instance, &destroySingleton );
133 Singleton<T>::destroySingleton()
135 assert( !_S_destroyed );
136 creation_policy::destroy( _S_instance );