Function List.release

Erases and deallocate the contents of the List, which becomes an empty list (with a length of 0 elements).

void release() nothrow scope;

Same as clear.

Examples

List!(int) list = List!(int).build(1, 2, 3);
assert(list.length == 3);

list.release();
assert(list.length == 0);