scopeBuffer

This is a slightly simpler way to create a ScopeBuffer instance that uses type deduction.

scopeBuffer
(
T
)
(
T[] tmpbuf
)

Parameters

tmpbuf
Type: T[]

the initial buffer to use

Return Value

Type: auto

an instance of ScopeBuffer

Examples

ubyte[10] tmpbuf = void;
auto sb = scopeBuffer(tmpbuf);
scope(exit) sp.free();

Meta