mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 16:43:58 +00:00
Resolve LIBZMQ-464
This commit is contained in:
parent
1d9a3fd480
commit
fec6497976
@ -283,7 +283,14 @@ bool zmq::msg_t::rm_refs (int refs_)
|
|||||||
|
|
||||||
// The only message type that needs special care are long messages.
|
// The only message type that needs special care are long messages.
|
||||||
if (!u.lmsg.content->refcnt.sub (refs_)) {
|
if (!u.lmsg.content->refcnt.sub (refs_)) {
|
||||||
close ();
|
// We used "placement new" operator to initialize the reference
|
||||||
|
// counter so we call the destructor explicitly now.
|
||||||
|
u.lmsg.content->refcnt.~atomic_counter_t ();
|
||||||
|
|
||||||
|
if (u.lmsg.content->ffn)
|
||||||
|
u.lmsg.content->ffn (u.lmsg.content->data, u.lmsg.content->hint);
|
||||||
|
free (u.lmsg.content);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user