AceMobileInterview

iOS track

General topic questions

Capture Lists

MediumCommon

Free section · general topics & algorithms

Explain [weak self] vs [unowned self] in escaping closures.

Reveal model answer
weak self makes self optional and avoids cycles when lifetime is uncertain. unowned assumes self outlives the closure—crashes if wrong. Prefer weak for UI/async work unless lifetime is guaranteed.
Coordinator PatternMVC vs MVVM vs VIPER