Что выведется №7
Условие задачи
swiftimport Foundation
class A: NSObject {
weak var delegate: B?
}
class B: NSObject {
weak var delegate: A?
}
var a: A?
var b: B?
func configure() {
a = A()
b = B()
a?.delegate = b
b?.delegate = a
}
configure()
print(a) // ?
print(b) // ?
print(a?.delegate) // ?
print(b?.delegate) // ?