mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
Fix leaking technique (#2963)
Using `Unmanaged.passRetained` is correct and therefore safe under all compiler optimizations
This commit is contained in:
1 parent
37b31b95c2
commit
3fda9430aa
1 file changed
+1
-1
@@ -117,6 +117,6 @@ private let globalPosixBlockingPool: NIOThreadPool = {
|
||||
numberOfThreads: NIOSingletons.blockingPoolThreadCountSuggestion,
|
||||
threadNamePrefix: "SGLTN-TP-#"
|
||||
)
|
||||
_ = Unmanaged.passUnretained(pool).retain() // never gonna let you down.
|
||||
_ = Unmanaged.passRetained(pool) // never gonna let you down.
|
||||
return pool
|
||||
}()
|
||||
Reference in new issue
Block a user