mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
s_instance ptr may be accessed by thread.
This commit is contained in:
parent
037a4d7fac
commit
52d24d0d4c
@ -37,11 +37,12 @@ Profiler::Profiler()
|
|||||||
|
|
||||||
Profiler::~Profiler()
|
Profiler::~Profiler()
|
||||||
{
|
{
|
||||||
|
m_shutdown.store( true, std::memory_order_relaxed );
|
||||||
|
m_thread.join();
|
||||||
|
|
||||||
assert( s_instance );
|
assert( s_instance );
|
||||||
s_instance = nullptr;
|
s_instance = nullptr;
|
||||||
|
|
||||||
m_shutdown.store( true, std::memory_order_relaxed );
|
|
||||||
m_thread.join();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t Profiler::GetNewId()
|
uint64_t Profiler::GetNewId()
|
||||||
|
@ -28,11 +28,11 @@ View::View( const char* addr )
|
|||||||
|
|
||||||
View::~View()
|
View::~View()
|
||||||
{
|
{
|
||||||
assert( s_instance != nullptr );
|
|
||||||
s_instance = nullptr;
|
|
||||||
|
|
||||||
m_shutdown.store( true, std::memory_order_relaxed );
|
m_shutdown.store( true, std::memory_order_relaxed );
|
||||||
m_thread.join();
|
m_thread.join();
|
||||||
|
|
||||||
|
assert( s_instance != nullptr );
|
||||||
|
s_instance = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool View::ShouldExit()
|
bool View::ShouldExit()
|
||||||
|
Loading…
Reference in New Issue
Block a user