msgpack-c icon indicating copy to clipboard operation
msgpack-c copied to clipboard

array_ref allocates memory when creating object with zone

Open redboltz opened this issue 8 years ago • 0 comments

msgpack::type::array_ref is a kind of reference type as msgpack::type::raw_ref. It shouldn't allocate memory.

However, it allocates memory from zone.

https://github.com/msgpack/msgpack-c/blob/master/include/msgpack/v1/adaptor/array_ref.hpp#L256

It should be similar to raw_ref.

https://github.com/msgpack/msgpack-c/blob/master/include/msgpack/v1/adaptor/raw.hpp#L83

redboltz avatar May 07 '17 12:05 redboltz