TMemoryBuffer.this

Constructs a new memory transport with an empty internal buffer, reserving space for capacity bytes in advance.

If the amount of data which will be written to the buffer is already known on construction, this can better performance over the default constructor because reallocations can be avoided.

If the preallocated buffer is exhausted, data can still be written to the transport, but reallocations will happen.

  1. this()
  2. this(size_t capacity)
    class TMemoryBuffer
    this
    (
    size_t capacity
    )
  3. this(ubyte[] contents)

Parameters

capacity size_t

Size of the initially reserved buffer (in bytes).

Meta