diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-02 17:22:24 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-02 17:22:24 +0200 |
commit | f46e1f6775b5e052ebe12f9db2eb211d1622274b (patch) | |
tree | 4a2fcd6ef65756e04f8ece8cd92e8f29f9707b9a /async/autotests/asynctest.cpp | |
parent | 93f224b1f6ca0a69a5c4610466baa43b43d042e3 (diff) | |
download | sink-f46e1f6775b5e052ebe12f9db2eb211d1622274b.tar.gz sink-f46e1f6775b5e052ebe12f9db2eb211d1622274b.zip |
ResourceAccess: copy the buffer before capturing it in the lambda.
It's lifetime is limited to the end of the function, so we have to copy it before.
I switched to QByteArray because it simplifies the code and shouldn't really
cost anything, additionally the implicit sharing makes copies cheap.
This patch incurs the cost of always copying the buffer instead of writing
straight to the socket, but we probably anyways want to keep a copy around,
and if it would indeed be a performance issues (I doubt it), we could still optimize
that copy away.
Diffstat (limited to 'async/autotests/asynctest.cpp')
0 files changed, 0 insertions, 0 deletions