DevPrep

All topics

💾 Memory management: iOS interview questions

  1. Memory management Junior PRO
  2. Reference counting Junior PRO
  3. ARC Junior PRO
  4. MRC Middle PRO
  5. Freeing memory in MRC Middle PRO
  6. autorelease vs release? Middle PRO
  7. How are weak references implemented in Swift? Senior PRO
  8. Describe the lifecycle of an object in Swift. Senior PRO
  9. When can you skip [weak self] in a closure? Middle PRO
  10. When do you need an autoreleasepool in Swift? Middle PRO
  11. What if the project uses ARC but you need non-ARC classes? Middle PRO
  12. How do the stack and the heap work? Junior PRO
  13. Each thread has its own stack — what about the heap? Junior PRO
  14. What is a side table and when is it created? Senior PRO
  15. Can a reference type live on the stack? Senior PRO
  16. How many bytes per memory access? What is a word? Middle PRO
  17. What is MemoryLayout? size, stride, alignment Senior PRO
  18. Does the order of struct fields affect its size? Senior PRO
  19. What is virtual memory? Where do code, stack and heap physically live? Senior PRO
  20. How do file-backed pages differ from anonymous? Senior PRO
  21. Why is there no swap in iOS? What happens under memory pressure? Senior PRO
  22. What is jetsam? How does the system decide which app to kill? Senior PRO
  23. How do you diagnose a memory leak? Middle PRO
  24. Dirty vs resident vs virtual memory? Senior PRO
  25. [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