Daily iOS
Memory and ARC

MRC and autorelease

Before ARC, Objective-C code called retain, release, and autorelease directly. What did each one do, and what did ARC change?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Under MRC the developer paired retain and release by the ownership rules and used autorelease to defer a release until the pool drained. Under ARC the compiler inserts those calls instead of you writing them; the runtime model is unchanged.

Share a question