---
title: "AsyncThrowingStream.Continuation.BufferingPolicy.bufferingNewest(_:)"
framework: swift
role: symbol
role_heading: Case
path: "swift/asyncthrowingstream/continuation/bufferingpolicy/bufferingnewest(_:)"
---

# AsyncThrowingStream.Continuation.BufferingPolicy.bufferingNewest(_:)

When the buffer is full, discard the oldest element in the buffer.

## Declaration

```swift
case bufferingNewest(Int)
```

## Discussion

Discussion This strategy enforces keeping at most the specified number of newest values. note: If the specified number is zero or negative, no elements are buffered. In that case, an iterator receives an element only if it is already awaiting a value when the continuation yields.

## See Also

### Buffering Policies

- [AsyncThrowingStream.Continuation.BufferingPolicy.unbounded](swift/asyncthrowingstream/continuation/bufferingpolicy/unbounded.md)
- [AsyncThrowingStream.Continuation.BufferingPolicy.bufferingOldest(_:)](swift/asyncthrowingstream/continuation/bufferingpolicy/bufferingoldest(_:).md)
