mirror of
https://github.com/boostorg/asio.git
synced 2026-01-26 18:22:09 +00:00
Restore null pointer check for better performance.
This commit is contained in:
@@ -66,7 +66,13 @@ public:
|
||||
~thread_info_base()
|
||||
{
|
||||
for (int i = 0; i < max_mem_index; ++i)
|
||||
::operator delete(reusable_memory_[i]);
|
||||
{
|
||||
// The following test for non-null pointers is technically redundant, but
|
||||
// it is significantly faster when using a tight io_context::poll() loop
|
||||
// in latency sensitive applications.
|
||||
if (reusable_memory_[i])
|
||||
::operator delete(reusable_memory_[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void* allocate(thread_info_base* this_thread, std::size_t size)
|
||||
|
||||
Reference in New Issue
Block a user