diff --git a/src/platform/gui.h b/src/platform/gui.h index a2512a75..ecfc69f1 100644 --- a/src/platform/gui.h +++ b/src/platform/gui.h @@ -140,7 +140,7 @@ public: virtual void RunAfterProcessingEvents() { RunAfter(0); } }; -typedef std::unique_ptr TimerRef; +typedef std::shared_ptr TimerRef; TimerRef CreateTimer(); diff --git a/src/platform/guigtk.cpp b/src/platform/guigtk.cpp index ec5df52f..cf0c1373 100644 --- a/src/platform/guigtk.cpp +++ b/src/platform/guigtk.cpp @@ -218,7 +218,7 @@ public: }; TimerRef CreateTimer() { - return std::unique_ptr(new TimerImplGtk); + return std::make_shared(); } //----------------------------------------------------------------------------- diff --git a/src/platform/guimac.mm b/src/platform/guimac.mm index 43e2b678..472087f5 100644 --- a/src/platform/guimac.mm +++ b/src/platform/guimac.mm @@ -187,7 +187,7 @@ public: }; TimerRef CreateTimer() { - return std::unique_ptr(new TimerImplCocoa); + return std::make_shared(); } //----------------------------------------------------------------------------- diff --git a/src/platform/guinone.cpp b/src/platform/guinone.cpp index d415e4f3..03077458 100644 --- a/src/platform/guinone.cpp +++ b/src/platform/guinone.cpp @@ -89,7 +89,7 @@ public: }; TimerRef CreateTimer() { - return std::unique_ptr(new TimerImplDummy); + return std::make_shared(); } //----------------------------------------------------------------------------- diff --git a/src/platform/guiwin.cpp b/src/platform/guiwin.cpp index 469e0521..fa641759 100644 --- a/src/platform/guiwin.cpp +++ b/src/platform/guiwin.cpp @@ -258,7 +258,7 @@ public: }; TimerRef CreateTimer() { - return std::unique_ptr(new TimerImplWin32); + return std::make_shared(); } //-----------------------------------------------------------------------------