Collect garbage at each iteration.