GrowingContainer.reset

Reset the current container to zero. Doesn't deallocate memory

struct GrowingContainer(T, size_t size = 1000, Allocator = Mallocator)
@safe @nogc nothrow
void
reset
()
if (
__traits(isPOD, T) ||
__traits(isArithmetic, T)
)

Examples

GrowingContainer!int container;
container.put(10);
assert(container.length != 0);
container.reset();
assert(container.length == 0);

Meta