Home
last modified time | relevance | path

Searched refs:DelayedSingleton (Results 1 - 3 of 3) sorted by relevance

/commonlibrary/c_utils/base/include/
H A Dsingleton.h29 * Taking DelayedSingleton as an example, when declaring the target class as a
36 * @brief Sets `MyClass` as a `DelayedSingleton`.
39 * `DelayedSingleton<MyClass>::GetInstance()`.
49 friend DelayedSingleton<MyClass>;\
87 * @brief DelayedSingleton is a thread-safe, memory-safe lazy initialized
91 class DelayedSingleton : public NoCopyable { class
112 static std::shared_ptr<T> instance_; // Record the created DelayedSingleton instance.
117 std::shared_ptr<T> DelayedSingleton<T>::instance_ = nullptr;
120 std::mutex DelayedSingleton<T>::mutex_;
123 std::shared_ptr<T> DelayedSingleton<
[all...]
/commonlibrary/c_utils/base/test/benchmarktest/singleton_benchmark_test/
H A Dsingleton_benchmark_test.cpp90 class DelayedSingletonTest : public DelayedSingleton<DelayedSingletonTest> {
126 shared_ptr<DelayedSingletonDeclearTest> sp1 = DelayedSingleton<DelayedSingletonDeclearTest>::GetInstance(); in BENCHMARK_F()
130 shared_ptr<DelayedSingletonDeclearTest> sp2 = DelayedSingleton<DelayedSingletonDeclearTest>::GetInstance(); in BENCHMARK_F()
215 shared_ptr<DelayedSingletonTest> sp1 = DelayedSingleton<DelayedSingletonTest>::GetInstance(); in BENCHMARK_F()
219 DelayedSingleton<DelayedSingletonTest>::DestroyInstance(); in BENCHMARK_F()
/commonlibrary/c_utils/base/test/unittest/common/
H A Dutils_singleton_test.cpp57 class DelayedSingletonTest: public DelayedSingleton<DelayedSingletonTest> {
118 shared_ptr<DelayedSingletonDeclearTest> sp1 = DelayedSingleton<DelayedSingletonDeclearTest>::GetInstance(); in HWTEST_F()
120 shared_ptr<DelayedSingletonDeclearTest> sp2 = DelayedSingleton<DelayedSingletonDeclearTest>::GetInstance(); in HWTEST_F()

Completed in 2 milliseconds