Skip to content

Commit 1424a88

Browse files
authored
Merge pull request #2213 from drodriguez/gardening-weak-holds-weakly
[gardening] Fix assign to a weak variable releasing immediately.
2 parents 2df6602 + 9070817 commit 1424a88

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

TestFoundation/TestNotificationQueue.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,9 @@ FIXME SR-4280 timeouts in TestNSNotificationQueue tests
205205
weak var notificationQueue: NotificationQueue?
206206

207207
self.executeInBackgroundThread() {
208-
notificationQueue = NotificationQueue(notificationCenter: NotificationCenter())
209-
XCTAssertNotNil(notificationQueue)
208+
let nq = NotificationQueue(notificationCenter: NotificationCenter())
209+
notificationQueue = nq
210+
XCTAssertNotNil(nq)
210211
}
211212

212213
XCTAssertNil(notificationQueue)

0 commit comments

Comments
 (0)