mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-27 05:04:23 +00:00
Motivation: When the stream channel has closed it drops all of its pending reads. It does this by calling 'removeAll()' on its CircularBuffer. The buffers underlying storage is emptied and then a `nil` is appended (internally CircularBuffer is never empty) which triggers an allocation. Modifications: - Remove all but keep capacity Result: Fewer allocations