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.
1 parent 15a8716 commit 9a00e67Copy full SHA for 9a00e67
Foundation/NSSwiftRuntime.swift
@@ -341,12 +341,12 @@ extension NSObject {
341
}
342
343
func withUnretainedReference<T, R>(_ work: @noescape (UnsafePointer<T>) -> R) -> R {
344
- let selfPtr = Unmanaged.passRetained(self).toOpaque().assumingMemoryBound(to: T.self)
+ let selfPtr = Unmanaged.passUnretained(self).toOpaque().assumingMemoryBound(to: T.self)
345
return work(selfPtr)
346
347
348
func withUnretainedReference<T, R>(_ work: @noescape (UnsafeMutablePointer<T>) -> R) -> R {
349
350
351
352
0 commit comments