ScopeBuffer.this

this(T[] buf)

Initialize with buf to use as scratch buffer space.

Parameters

bufScratch buffer space, must have length that is even Example:
ubyte[10] tmpbuf = void;
auto sbuf = ScopeBuffer!ubyte(tmpbuf);

Note

If buf was created by the same realloc passed as a parameter

to ScopeBuffer, then the contents of ScopeBuffer can be extracted without needing to copy them, and ScopeBuffer.free() will not need to be called.