My application is a network application. Its job is to receive streams of packets (QByteArray) in which I would like to emit them as signals. Would doing so be inefficient? I'm concerned with copying of large buffers.
QByteArray uses Copy-on-write. Which means that only the pointer is copied around, that is, until you modify the content of the QByteArray. So you should be all right if you just pass it along.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With