Memory and ARC interview questions

How ARC counts references, how retain cycles form and break, weak vs unowned, and how to find leaks.

4 quick facts

– interview-ready · 7 questions in this topic

– of 7 tried

Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.

Questions

  1. How ARC worksPredict
  2. Retain cycles and how to break themSpot the bug
  3. Retain cycles in closuresSpot the bug
  4. weak vs unownedPick the fix
  5. Autorelease pools todayPick the fix
  6. Finding memory leaksOrder the steps
  7. Responding to memory pressurePick the fix

Practise this topic

Flashcards · 11

Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.

Quick quiz · 7 questions

One exercise per question, checked as you go. Needs JavaScript.

Mock interview · 1 set

Timed, out loud, then tick what you covered. Needs JavaScript.

Fix this PR · 2 reviews

Review a diff like a senior: flag the lines you'd comment on. Needs JavaScript.

Quick facts

Recall the answer first, then tap Show to check.