Beginner
Swift
Q22 / 100
What is an unowned reference?
Correct! Well done.
Incorrect.
The correct answer is B) A non-optional reference that does not retain the object; assumes the object always exists when accessed (crashes if nil)
B
Correct Answer
A non-optional reference that does not retain the object; assumes the object always exists when accessed (crashes if nil)
Explanation
unowned let customer: Customer assumes customer outlives the dependent object. Use when the referenced object always has a longer lifetime. Accessing a deallocated unowned reference crashes.
Progress
22/100