MCPcopy Create free account
hub / github.com/Vhonowslend/StreamFX-Public / instance

Method instance

source/obs/obs-source-tracker.cpp:239–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239std::shared_ptr<streamfx::obs::source_tracker> streamfx::obs::source_tracker::instance()
240{
241 static std::weak_ptr<streamfx::obs::source_tracker> winst;
242 static std::mutex mtx;
243
244 std::unique_lock<decltype(mtx)> lock(mtx);
245 auto instance = winst.lock();
246 if (!instance) {
247 instance = std::shared_ptr<streamfx::obs::source_tracker>(new streamfx::obs::source_tracker());
248 winst = instance;
249 }
250 return instance;
251}
252
253static std::shared_ptr<streamfx::obs::source_tracker> loader_instance;
254

Callers

nothing calls this directly

Calls 1

lockMethod · 0.80

Tested by

no test coverage detected