Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2019-04-15 21:22:40 +0300
committerRoman Kuznetsov <r.kuznetsow@gmail.com>2019-04-17 13:20:55 +0300
commit4745d564c79cb684511278fe24aa5f95709bab8c (patch)
treee3815accaef475e27f85602fc1aa4394ce23311b /map
parent8563b60f6c406050299bb41d94ba528662b78fb2 (diff)
[ugc] creation and destruction order is changed
Diffstat (limited to 'map')
-rw-r--r--map/framework.cpp6
-rw-r--r--map/framework.hpp7
2 files changed, 7 insertions, 6 deletions
diff --git a/map/framework.cpp b/map/framework.cpp
index 16c1858e6a..b6ee74669d 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -467,6 +467,9 @@ Framework::Framework(FrameworkParams const & params)
InitCountryInfoGetter();
LOG(LDEBUG, ("Country info getter initialized"));
+ InitUGC();
+ LOG(LDEBUG, ("UGC initialized"));
+
InitSearchAPI();
LOG(LDEBUG, ("Search API initialized"));
@@ -543,9 +546,6 @@ Framework::Framework(FrameworkParams const & params)
m_trafficManager.SetSimplifiedColorScheme(LoadTrafficSimplifiedColors());
m_trafficManager.SetEnabled(LoadTrafficEnabled());
- InitUGC();
- LOG(LDEBUG, ("UGC initialized"));
-
m_adsEngine = make_unique<ads::Engine>();
InitTransliteration();
diff --git a/map/framework.hpp b/map/framework.hpp
index bf927405d4..5a0697c85d 100644
--- a/map/framework.hpp
+++ b/map/framework.hpp
@@ -197,6 +197,10 @@ protected:
LocalAdsManager m_localAdsManager;
+ // The order matters here: ugc::Api should be destroyed after
+ // SearchAPI and notifications::NotificationManager.
+ unique_ptr<ugc::Api> m_ugcApi;
+
unique_ptr<SearchAPI> m_searchAPI;
search::QuerySaver m_searchQuerySaver;
@@ -238,9 +242,6 @@ protected:
RoutingManager m_routingManager;
TrafficManager m_trafficManager;
-
- unique_ptr<ugc::Api> m_ugcApi;
-
User m_user;
booking::filter::FilterProcessor m_bookingFilterProcessor;