clone

Buffer.clone(auto_copy: bool = True)

Creates a copy of the current Buffer object.

Parameters:

auto_copy (bool) -- If set to True (default), a new buffer is allocated and both the data and metadata are copied. If set to False, only metadata is copied and the memory is uninitialized.

Returns:

A new Buffer object as a copy of the current one.

Return type:

Buffer