mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Cleanup zone data.
This commit is contained in:
parent
0de5bcacaf
commit
4cd9cf5dd9
@ -550,6 +550,16 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
}
|
||||
}
|
||||
|
||||
template<class T>
|
||||
static inline void ZoneCleanup( Vector<T>& vec )
|
||||
{
|
||||
for( auto& v : vec )
|
||||
{
|
||||
ZoneCleanup( v->child );
|
||||
}
|
||||
vec.~Vector<T>();
|
||||
}
|
||||
|
||||
Worker::~Worker()
|
||||
{
|
||||
Shutdown();
|
||||
@ -560,6 +570,14 @@ Worker::~Worker()
|
||||
delete[] m_buffer;
|
||||
LZ4_freeStreamDecode( m_stream );
|
||||
|
||||
for( auto& v : m_data.threads )
|
||||
{
|
||||
ZoneCleanup( v->timeline );
|
||||
}
|
||||
for( auto& v : m_data.gpuData )
|
||||
{
|
||||
ZoneCleanup( v->timeline );
|
||||
}
|
||||
for( auto& v : m_data.plots )
|
||||
{
|
||||
v->~PlotData();
|
||||
|
Loading…
Reference in New Issue
Block a user