copy


Description:

public Buffer copy ()

Makes a copy of this.

In reality, Buffer is a refcounted type, and calling copy will normally just increment the refcount on this and return it. However, if this was created with TEMPORARY memory, then copy will actually return a copy of it, so that the data in the copy will remain valid after the temporary buffer is freed.

Parameters:

this

a Buffer

Returns:

the new (or newly-reffed) buffer