1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Manual allocation of socket memory.

This commit is contained in:
Bartosz Taudul
2017-10-18 19:49:17 +02:00
parent fc94378e0c
commit 51013dc0e6
4 changed files with 15 additions and 6 deletions
+7
View File
@@ -101,6 +101,7 @@ Profiler::Profiler()
, m_mainThread( GetThreadHandle() )
, m_epoch( std::chrono::duration_cast<std::chrono::seconds>( std::chrono::system_clock::now().time_since_epoch() ).count() )
, m_shutdown( false )
, m_sock( nullptr )
, m_stream( LZ4_createStream() )
, m_buffer( (char*)tracy_malloc( TargetFrameSize*3 ) )
, m_bufferOffset( 0 )
@@ -134,6 +135,12 @@ Profiler::~Profiler()
tracy_free( m_buffer );
LZ4_freeStream( m_stream );
if( m_sock )
{
m_sock->~Socket();
tracy_free( m_sock );
}
assert( s_instance );
s_instance = nullptr;
}