summaryrefslogtreecommitdiff
path: root/swift/Sources
diff options
context:
space:
mode:
Diffstat (limited to 'swift/Sources')
-rw-r--r--swift/Sources/FlatBuffers/FlatBufferBuilder.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/swift/Sources/FlatBuffers/FlatBufferBuilder.swift b/swift/Sources/FlatBuffers/FlatBufferBuilder.swift
index 5ccc7e44..223f7ffa 100644
--- a/swift/Sources/FlatBuffers/FlatBufferBuilder.swift
+++ b/swift/Sources/FlatBuffers/FlatBufferBuilder.swift
@@ -127,8 +127,8 @@ public struct FlatBufferBuilder {
mutating public func clear() {
_minAlignment = 0
isNested = false
- stringOffsetMap = [:]
- _vtables = []
+ stringOffsetMap.removeAll(keepingCapacity: true)
+ _vtables.removeAll(keepingCapacity: true)
_vtableStorage.clear()
_bb.clear()
}