mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-26 10:32:58 +01:00
define a macro for heap object deletion in a unified manner (related to issue #1524)
This commit is contained in:
@@ -172,13 +172,15 @@ zmq::stream_engine_t::~stream_engine_t ()
|
||||
|
||||
// Drop reference to metadata and destroy it if we are
|
||||
// the only user.
|
||||
if (metadata != NULL)
|
||||
if (metadata->drop_ref ())
|
||||
delete metadata;
|
||||
if (metadata != NULL) {
|
||||
if (metadata->drop_ref ()) {
|
||||
LIBZMQ_DELETE(metadata);
|
||||
}
|
||||
}
|
||||
|
||||
delete encoder;
|
||||
delete decoder;
|
||||
delete mechanism;
|
||||
LIBZMQ_DELETE(encoder);
|
||||
LIBZMQ_DELETE(decoder);
|
||||
LIBZMQ_DELETE(mechanism);
|
||||
}
|
||||
|
||||
void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
|
||||
|
||||
Reference in New Issue
Block a user