Problem: excessive memory allocations around blob_t (#2796)

* Problem: excessive memory allocations around blob_t

Solution: redefine blob_t as a custom type, and use reference/move
semantics where possible
This commit is contained in:
Simon Giesecke
2017-10-21 13:19:51 +02:00
committed by Luca Boccassi
parent cfef04035c
commit 0897b3e07b
33 changed files with 207 additions and 159 deletions

View File

@@ -901,7 +901,7 @@ int zmq::stream_engine_t::write_credential (msg_t *msg_)
zmq_assert (mechanism != NULL);
zmq_assert (session != NULL);
const blob_t credential = mechanism->get_user_id ();
const blob_t &credential = mechanism->get_user_id ();
if (credential.size () > 0) {
msg_t msg;
int rc = msg.init_size (credential.size ());