performance optimization for buffer allocations
This commit is contained in:
parent
130c6a9c55
commit
158dd71ac2
@ -3305,6 +3305,10 @@ namespace libtorrent
|
||||
return false;
|
||||
}
|
||||
|
||||
// first free the old buffer
|
||||
m_disk_recv_buffer.reset();
|
||||
// then allocate a new one
|
||||
|
||||
m_disk_recv_buffer.reset(m_ses.allocate_disk_buffer("receive buffer"));
|
||||
if (!m_disk_recv_buffer)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user