We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d46211 commit ce1eb62Copy full SHA for ce1eb62
1 file changed
src/logger.hpp
@@ -1716,7 +1716,11 @@ inline void Logger::shutdown(bool clear_sinks) {
1716
}
1717
1718
if (clear_sinks) {
1719
- // Clear sinks to release file handles and other resources
+ // Clear sinks to release file handles and other resources.
1720
+ // sinkname_index_map_ holds string_view keys that point into the name
1721
+ // strings owned by each sink object — it must be cleared first so no
1722
+ // dangling views remain after the sink shared_ptrs are destroyed.
1723
+ sinkname_index_map_.clear();
1724
sinks_.clear();
1725
1726
log_queue_.reset();
0 commit comments