mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-23 08:31:46 +02:00
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:

committed by
Luca Boccassi

parent
cfef04035c
commit
0897b3e07b
@@ -1491,9 +1491,11 @@ int zmq::socket_base_t::xrecv (msg_t *)
|
||||
return -1;
|
||||
}
|
||||
|
||||
zmq::blob_t zmq::socket_base_t::get_credential () const
|
||||
static const zmq::blob_t empty_blob;
|
||||
|
||||
const zmq::blob_t &zmq::socket_base_t::get_credential () const
|
||||
{
|
||||
return blob_t ();
|
||||
return empty_blob;
|
||||
}
|
||||
|
||||
void zmq::socket_base_t::xread_activated (pipe_t *)
|
||||
|
Reference in New Issue
Block a user