Commit 7a960ff2 authored by Volodymyr Korniichuk's avatar Volodymyr Korniichuk

useless checks were removed

parent 23e58e30
......@@ -74,13 +74,11 @@ zmq::ctx_t::~ctx_t ()
delete io_threads [i];
// Deallocate the reaper thread object.
if (reaper)
delete reaper;
// Deallocate the array of mailboxes. No special work is
// needed as mailboxes themselves were deallocated with their
// corresponding io_thread/socket objects.
if (slots)
free (slots);
// Remove the tag, so that the object is considered dead.
......
......@@ -54,7 +54,6 @@ zmq::mtrie_t::~mtrie_t ()
else
if (count > 1) {
for (unsigned short i = 0; i != count; ++i)
if (next.table [i])
delete next.table [i];
free (next.table);
}
......
......@@ -96,7 +96,6 @@ zmq::session_base_t::~session_base_t ()
if (engine)
engine->terminate ();
if (addr)
delete addr;
}
......
......@@ -114,11 +114,8 @@ zmq::stream_engine_t::~stream_engine_t ()
int rc = tx_msg.close ();
errno_assert (rc == 0);
if (encoder != NULL)
delete encoder;
if (decoder != NULL)
delete decoder;
if (mechanism != NULL)
delete mechanism;
}
......
......@@ -48,7 +48,6 @@ zmq::trie_t::~trie_t ()
else
if (count > 1) {
for (unsigned short i = 0; i != count; ++i)
if (next.table [i])
delete next.table [i];
free (next.table);
}
......
......@@ -72,7 +72,6 @@ namespace zmq
}
chunk_t *sc = spare_chunk.xchg (NULL);
if (sc)
free (sc);
}
......@@ -156,7 +155,6 @@ namespace zmq
// so for cache reasons we'll get rid of the spare and
// use 'o' as the spare.
chunk_t *cs = spare_chunk.xchg (o);
if (cs)
free (cs);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment