libuv read callback uv_buf_t cleanup

Viewed 384

The signature of the libuv read completion callback is:

void (*uv_read_cb)(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf)

My understanding from the documentation is that my callback is responsible for freeing the base member of the supplied uv_buf_t*. My question is - who is responsible for freeing the memory pointed to by buf?

1 Answers
Related