mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 14:03:52 +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()
|
Worker::~Worker()
|
||||||
{
|
{
|
||||||
Shutdown();
|
Shutdown();
|
||||||
@ -560,6 +570,14 @@ Worker::~Worker()
|
|||||||
delete[] m_buffer;
|
delete[] m_buffer;
|
||||||
LZ4_freeStreamDecode( m_stream );
|
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 )
|
for( auto& v : m_data.plots )
|
||||||
{
|
{
|
||||||
v->~PlotData();
|
v->~PlotData();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user