remAInder.pro
iOS Interview Platform

Ace Your
iOS Interview

Проверь свои знания iOS-разработки и получи детальный фидбек как на реальном интервью

400+
Questions
5
Levels
AI
Feedback
Sample · ARC & Memory

What is the difference between strong, weak, and unowned references in Swift?

Astrong retains, weak/unowned don't — weak is Optional, unowned is not
BAll three are the same, just different syntax sugar
Cweak retains, strong and unowned do not retain the object
Dunowned is only for closures, not for properties

Correct! strong retains (ARC +1),weak is nil-able and non-retaining, unowned assumes the object outlives the reference.

Выбери уровень