Commit f4516192 authored by Dominik Charousset's avatar Dominik Charousset

Remove logging from some singleton stop functions

Some `stop()` functions can get called after the logger has been destroyed,
causing a memory leak at program exit.
parent f9847fc2
...@@ -44,7 +44,7 @@ private: ...@@ -44,7 +44,7 @@ private:
} }
void stop() { void stop() {
CAF_LOG_TRACE(""); // nop
} }
void initialize() { void initialize() {
...@@ -76,7 +76,7 @@ private: ...@@ -76,7 +76,7 @@ private:
} }
void stop() { void stop() {
CAF_LOG_TRACE(""); // nop
} }
void initialize() { void initialize() {
......
...@@ -52,7 +52,7 @@ abstract_group::module::module(std::string mname) : name_(std::move(mname)) { ...@@ -52,7 +52,7 @@ abstract_group::module::module(std::string mname) : name_(std::move(mname)) {
} }
void abstract_group::module::stop() { void abstract_group::module::stop() {
CAF_LOG_TRACE(""); // nop
} }
const std::string& abstract_group::module::name() const { const std::string& abstract_group::module::name() const {
......
...@@ -426,7 +426,6 @@ std::atomic<size_t> s_ad_hoc_id; ...@@ -426,7 +426,6 @@ std::atomic<size_t> s_ad_hoc_id;
} // namespace <anonymous> } // namespace <anonymous>
void group_manager::stop() { void group_manager::stop() {
CAF_LOG_TRACE("");
modules_map mm; modules_map mm;
{ // critical section { // critical section
std::lock_guard<std::mutex> guard(mmap_mtx_); std::lock_guard<std::mutex> guard(mmap_mtx_);
......
...@@ -124,7 +124,7 @@ node_id::data::~data() { ...@@ -124,7 +124,7 @@ node_id::data::~data() {
} }
void node_id::data::stop() { void node_id::data::stop() {
CAF_LOG_TRACE(""); // nop
} }
// initializes singleton // initializes singleton
......
...@@ -96,10 +96,10 @@ void singletons::stop_singletons() { ...@@ -96,10 +96,10 @@ void singletons::stop_singletons() {
// final steps // final steps
CAF_LOGF_DEBUG("stop and dispose logger, bye"); CAF_LOGF_DEBUG("stop and dispose logger, bye");
stop(s_logger); stop(s_logger);
dispose(s_logger);
stop(s_uniform_type_info_map); stop(s_uniform_type_info_map);
dispose(s_uniform_type_info_map);
stop(s_node_id); stop(s_node_id);
dispose(s_logger);
dispose(s_uniform_type_info_map);
dispose(s_node_id); dispose(s_node_id);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment