DevPrep

All topics › Memory management

MRC

Middle PRO

Context

MRC (Manual Reference Counting / Manual Retain-Release) is manual memory management in Objective-C before ARC (2011). Today it shows up only in old libraries and files compiled with -fno-objc-arc. For an interview it is enough to know the ownership rules and how ARC automated them.

The rest of this answer, with code and interview follow-ups, is in the DevPrep app.

Read the full answer in DevPrep

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