Resets buffer without deallocating current pointer (#6247)

Resets buffer without deallocating current pointer & Bumps version
This commit is contained in:
mustiikhalil
2020-11-09 17:55:53 +03:00
committed by GitHub
parent aae376e9a8
commit 8778dc7c2b
2 changed files with 1 additions and 3 deletions

View File

@@ -283,8 +283,6 @@ public struct ByteBuffer {
mutating public func clear() {
_writerSize = 0
alignment = 1
_storage.memory.deallocate()
_storage.memory = UnsafeMutableRawPointer.allocate(byteCount: _storage.capacity, alignment: alignment)
_storage.initialize(for: _storage.capacity)
}