Create a new buffer and set the data to a copy of data.length
bytes of data
and the size to data.length
.
The data will be freed when the buffer is freed.
data |
data for the new buffer |
len |
the length of data |
A newly allocated buffer with a copy of |