[ugc] creation and destruction order is changed

This commit is contained in:
Arsentiy Milchakov 2019-04-15 21:22:40 +03:00 committed by Roman Kuznetsov
parent 8563b60f6c
commit 4745d564c7
2 changed files with 7 additions and 6 deletions

View file

@ -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();

View file

@ -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;