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

Method instance

source/ui/ui.cpp:251–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251std::shared_ptr<streamfx::ui::handler> streamfx::ui::handler::instance()
252{
253 static std::weak_ptr<streamfx::ui::handler> winst;
254 static std::mutex mtx;
255
256 std::unique_lock<decltype(mtx)> lock(mtx);
257 auto instance = winst.lock();
258 if (!instance) {
259 instance = std::shared_ptr<streamfx::ui::handler>(new streamfx::ui::handler());
260 winst = instance;
261 }
262 return instance;
263}
264
265streamfx::ui::translator::translator(QObject* parent) {}
266

Callers

nothing calls this directly

Calls 1

lockMethod · 0.80

Tested by

no test coverage detected