FastLED 3.9.15
Loading...
Searching...
No Matches

◆ instance()

template<typename T, int N = 0>
static T & fl::SingletonShared< T, N >::instance ( )
inlinestatic

Definition at line 81 of file singleton.h.

81 {
82 // Check the process-wide registry first (handles cross-DLL sharing).
83 // FL_PRETTY_FUNCTION produces a unique string per template instantiation
84 // (includes template parameters in the signature).
86 if (existing) {
87 return *static_cast<T*>(existing);
88 }
89 // First time for this type — create and register
90 T* ptr = instanceInner();
92 return *ptr;
93 }
static T * instanceInner() FL_NOEXCEPT
Definition singleton.h:104
void * singleton_registry_get(const char *key)
void singleton_registry_set(const char *key, void *value)

References FL_NOEXCEPT, FL_PRETTY_FUNCTION, instanceInner(), fl::detail::singleton_registry_get(), and fl::detail::singleton_registry_set().

Referenced by fl::get_async_logger_by_index(), and fl::detail::ActiveLoggerRegistry::instance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: