seniorSwift

What is difference between weak, strong, and unowned references?

Updated May 17, 2026

Short answer

Strong retains object, weak does not retain and becomes nil, unowned does not retain but assumes existence.

Deep explanation

Strong references increase ARC count. Weak references are optional and auto-nil when object deallocates. Unowned assumes object lifetime is guaranteed and can crash if accessed after deallocation.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Swift interview questions

View all →