diff options
author | crupest <crupest@outlook.com> | 2018-11-09 21:03:45 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-09 21:03:45 +0800 |
commit | 4b219b569c16db6027dd36e4656152f261321c60 (patch) | |
tree | 2f40c6aeb74382c5a958f153e4598950dffae94c /src/application.cpp | |
parent | 6515948e3f5b97f90446536f72e99d71e96f9de7 (diff) | |
parent | 9ef75fe91837394620edb91f332065a4f34a0281 (diff) | |
download | cru-4b219b569c16db6027dd36e4656152f261321c60.tar.gz cru-4b219b569c16db6027dd36e4656152f261321c60.tar.bz2 cru-4b219b569c16db6027dd36e4656152f261321c60.zip |
Merge branch 'master' into theme-resource
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/application.cpp b/src/application.cpp index df99cab8..dce01b11 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -5,7 +5,6 @@ #include "ui/window.hpp" #include "ui/cursor.hpp" #include "graph/graph.hpp" -#include "ui/animations/animation.hpp" namespace cru { constexpr auto god_window_class_name = L"GodWindowClass"; @@ -64,12 +63,12 @@ namespace cru { case WM_TIMER: { const auto id = static_cast<UINT_PTR>(w_param); - const auto action = application_->GetTimerManager()->GetAction(id); + const auto action = TimerManager::GetInstance()->GetAction(id); if (action.has_value()) { (action.value().second)(); if (!action.value().first) - Application::GetInstance()->GetTimerManager()->KillTimer(id); + TimerManager::GetInstance()->KillTimer(id); return 0; } break; @@ -117,11 +116,6 @@ namespace cru { instance_ = this; - window_manager_ = std::make_unique<ui::WindowManager>(); - graph_manager_ = std::make_unique<graph::GraphManager>(); - timer_manager_ = std::make_unique<TimerManager>(); - animation_manager_ = std::make_unique<ui::animations::details::AnimationManager>(); - god_window_ = std::make_unique<GodWindow>(this); #ifdef CRU_DEBUG_LAYOUT @@ -137,7 +131,8 @@ namespace cru { Application::~Application() { - animation_manager_.reset(); + for (auto i = singleton_list_.crbegin(); i != singleton_list_.crend(); ++i) + delete *i; instance_ = nullptr; } |