Alias List.clear
Erases and deallocate the contents of the List
, which becomes an empty list (with a length of 0 elements).
Same as release
.
Examples
List!(int) list = List!(int) .build(1, 2, 3);
assert(list .length == 3);
list .clear();
assert(list .length == 0);