Skip to content

Commit

Permalink
Add mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Dec 31, 2024
1 parent 63418db commit cb43b6e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Logger& Logger::instance(const char* name) {

if (instances.empty()) {
std::atexit([] {
std::lock_guard LK(mu);
for (const auto& [name, instance] : instances) {
delete instance;
}
Expand Down

0 comments on commit cb43b6e

Please sign in to comment.