The main loop below never changes the value of x[1] and never creates garbage (numbers are not objects). while x[1] do -- repeat until GC local a = A -- create garbage A = A+1 end