💾 Memory management: iOS interview questions
- Memory management Junior PRO
- Reference counting Junior PRO
- ARC Junior PRO
- MRC Middle PRO
- Freeing memory in MRC Middle PRO
- autorelease vs release? Middle PRO
- How are weak references implemented in Swift? Senior PRO
- Describe the lifecycle of an object in Swift. Senior PRO
- When can you skip [weak self] in a closure? Middle PRO
- When do you need an autoreleasepool in Swift? Middle PRO
- What if the project uses ARC but you need non-ARC classes? Middle PRO
- How do the stack and the heap work? Junior PRO
- Each thread has its own stack — what about the heap? Junior PRO
- What is a side table and when is it created? Senior PRO
- Can a reference type live on the stack? Senior PRO
- How many bytes per memory access? What is a word? Middle PRO
- What is MemoryLayout? size, stride, alignment Senior PRO
- Does the order of struct fields affect its size? Senior PRO
- What is virtual memory? Where do code, stack and heap physically live? Senior PRO
- How do file-backed pages differ from anonymous? Senior PRO
- Why is there no swap in iOS? What happens under memory pressure? Senior PRO
- What is jetsam? How does the system decide which app to kill? Senior PRO
- How do you diagnose a memory leak? Middle PRO
- Dirty vs resident vs virtual memory? Senior PRO
- [weak self] vs [unowned self] — when to use which? Middle PRO
Practice this before your interview
DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.
Get DevPrep on the App Store