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

Method instance

source/ui/ui-obs-browser-widget.cpp:58–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58std::shared_ptr<streamfx::ui::obs_browser_cef> streamfx::ui::obs_browser_cef::instance()
59{
60 static std::weak_ptr<obs_browser_cef> ptr;
61 static std::mutex lock;
62
63 std::lock_guard<decltype(lock)> lg(lock);
64 if (!ptr.expired()) {
65 return ptr.lock();
66 }
67
68 std::shared_ptr<obs_browser_cef> sintance{new obs_browser_cef()};
69 ptr = sintance;
70 return sintance;
71}
72
73streamfx::ui::obs_browser_widget::obs_browser_widget(QUrl url, QWidget* parent) : QWidget(parent)
74{

Callers

nothing calls this directly

Calls 2

expiredMethod · 0.80
lockMethod · 0.80

Tested by

no test coverage detected