mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-14 09:47:56 +08:00
Update decoder_allocators.cpp
zmq::shared_message_memory_allocator::deallocate () need to descontruct the object created by new operator.
This commit is contained in:
parent
8f238ae0b4
commit
bb7a1cc018
@ -102,6 +102,7 @@ void zmq::shared_message_memory_allocator::deallocate ()
|
||||
{
|
||||
zmq::atomic_counter_t *c = reinterpret_cast<zmq::atomic_counter_t *> (_buf);
|
||||
if (_buf && !c->sub (1)) {
|
||||
c->~atomic_counter_t();
|
||||
std::free (_buf);
|
||||
}
|
||||
clear ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user