Add buffer cleanup function.