-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Actually, it is not necessarily the case that a new buffer is allocated for each message. If you make sure to drop the |
Beta Was this translation helpful? Give feedback.
Actually, it is not necessarily the case that a new buffer is allocated for each message. If you make sure to drop the
BytesMut
before you callnext
again, then when it callsBytesMut::reserve
, it will notice that the refcount of theBytesMut
is 1 which allows it to reuse the existing allocation.