do-while-Funktion(Puffer cleaning)