Array!(int,4) arr; scope(exit) arr.free(); foreach(i; 0..6) { arr.insertBack(i); } assert(arr.data == [0,1,2,3,4,5]);
See Implementation