We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ed0772e + 5bcb0d0 commit eb393ceCopy full SHA for eb393ce
stdlib/public/core/SwiftNativeNSArray.swift
@@ -367,9 +367,11 @@ extension __SwiftNativeNSArrayWithContiguousStorage {
367
368
internal func _destroyBridgedStorage(_ hb: __BridgingBufferStorage?) {
369
if let bridgedStorage = hb {
370
- let buffer = _BridgingBuffer(bridgedStorage)
371
- let count = buffer.count
372
- buffer.baseAddress.deinitialize(count: count)
+ withExtendedLifetime(bridgedStorage) {
+ let buffer = _BridgingBuffer(bridgedStorage)
+ let count = buffer.count
373
+ buffer.baseAddress.deinitialize(count: count)
374
+ }
375
}
376
377
0 commit comments