mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
Shut up all channels on exit at some point
Some object are getting destroyed. Makes valgrind more quiet.
This commit is contained in:
parent
5871c4e93f
commit
d37e770497
1 changed files with 13 additions and 0 deletions
|
@ -245,6 +245,19 @@ namespace logs
|
||||||
|
|
||||||
logs::listener::~listener()
|
logs::listener::~listener()
|
||||||
{
|
{
|
||||||
|
// Shut up all channels on exit
|
||||||
|
if (auto logger = get_logger())
|
||||||
|
{
|
||||||
|
if (logger == this)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto&& pair : logger->channels)
|
||||||
|
{
|
||||||
|
pair.second->enabled.store(level::always, std::memory_order_relaxed);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void logs::listener::add(logs::listener* _new)
|
void logs::listener::add(logs::listener* _new)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue