diff options
author | Kozoriz <kozorizandriy@gmail.com> | 2016-04-20 17:54:47 +0300 |
---|---|---|
committer | Kozoriz <kozorizandriy@gmail.com> | 2016-04-25 16:35:16 +0300 |
commit | 72723be0357114617d87be396baba7a244a32b6e (patch) | |
tree | 07e3df82351c73f53291255bf18bcea09cf44935 /src/appMain | |
parent | 48f4d233ec6ee321292187df48f0adbfe1e3a52e (diff) | |
download | sdl_core-72723be0357114617d87be396baba7a244a32b6e.tar.gz |
Correctives after review
Diffstat (limited to 'src/appMain')
-rw-r--r-- | src/appMain/life_cycle.cc | 6 | ||||
-rw-r--r-- | src/appMain/life_cycle.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/appMain/life_cycle.cc b/src/appMain/life_cycle.cc index 7e542d119b..18de370018 100644 --- a/src/appMain/life_cycle.cc +++ b/src/appMain/life_cycle.cc @@ -68,7 +68,7 @@ void StopThread(System::Thread* thread) { } } // namespace -LifeCycle::LifeCycle(profile::Profile& profile) +LifeCycle::LifeCycle(const profile::Profile& profile) : transport_manager_(NULL) , protocol_handler_(NULL) , connection_handler_(NULL) @@ -361,8 +361,10 @@ void LifeCycle::StopComponents() { security_manager_->RemoveListener(app_manager_); LOG4CXX_INFO(logger_, "Destroying Crypto Manager"); delete crypto_manager_; + crypto_manager_ = NULL; LOG4CXX_INFO(logger_, "Destroying Security Manager"); delete security_manager_; + security_manager_ = NULL; } #endif // ENABLE_SECURITY protocol_handler_->Stop(); @@ -378,6 +380,7 @@ void LifeCycle::StopComponents() { transport_manager_->Visibility(false); transport_manager_->Stop(); delete transport_manager_; + transport_manager_ = NULL; LOG4CXX_INFO(logger_, "Stopping Connection Handler."); DCHECK_OR_RETURN_VOID(connection_handler_); @@ -400,6 +403,7 @@ void LifeCycle::StopComponents() { LOG4CXX_INFO(logger_, "Destroying Application Manager."); DCHECK(app_manager_); delete app_manager_; + app_manager_ = NULL; LOG4CXX_INFO(logger_, "Destroying HMI Message Handler and MB adapter."); diff --git a/src/appMain/life_cycle.h b/src/appMain/life_cycle.h index 3fbdbb7ab3..83651451e8 100644 --- a/src/appMain/life_cycle.h +++ b/src/appMain/life_cycle.h @@ -74,7 +74,7 @@ class SecurityManagerImpl; namespace main_namespace { class LifeCycle { public: - LifeCycle(profile::Profile& profile); + LifeCycle(const profile::Profile& profile); bool StartComponents(); /** @@ -120,7 +120,7 @@ class LifeCycle { #endif // MESSAGEBROKER_HMIADAPTER - profile::Profile& profile_; + const profile::Profile& profile_; DISALLOW_COPY_AND_ASSIGN(LifeCycle); }; } // namespace main_namespace |