Skip to content

Commit d6e31a8

Browse files
committed
[stdlib] Mark _NativeDictionary._delete(at:) non-releasing
This eliminates a retain/release pair around calls to it when it doesn’t get inlined. _delete is responsible for restoring hash table invariants after a removal. It moves around elements in complicated patterns, but it doesn’t release them.
1 parent 5e2c815 commit d6e31a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/core/NativeDictionary.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ extension _NativeDictionary: _HashTableDelegate {
540540

541541
extension _NativeDictionary { // Deletion
542542
@inlinable
543+
@_effects(releasenone)
543544
internal func _delete(at bucket: Bucket) {
544545
hashTable.delete(at: bucket, with: self)
545546
_storage._count -= 1

0 commit comments

Comments
 (0)