Commit 9c2acaaa authored by Fumitoshi Ukai's avatar Fumitoshi Ukai

delete LogDestination::sinks_ at DeleteLogDestinations().

fixes #8 AddLogSink memory leak
parent 1b0b08c8
...@@ -817,6 +817,11 @@ void LogDestination::DeleteLogDestinations() { ...@@ -817,6 +817,11 @@ void LogDestination::DeleteLogDestinations() {
delete log_destinations_[severity]; delete log_destinations_[severity];
log_destinations_[severity] = NULL; log_destinations_[severity] = NULL;
} }
MutexLock l(&sink_mutex_);
for (size_t i = 0; i < sinks_->size(); ++i) {
delete (*sinks_)[i];
}
delete sinks_;
} }
namespace { namespace {
......
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