Why do block-based APIs often cause hidden retain cycles?

Updated May 17, 2026

Short answer

Blocks capture strong references to objects they reference unless explicitly weakified.

Deep explanation

Blocks capture variables strongly by default, including self. If an object retains a block that also retains the object, a cycle forms. This is common in async APIs, animations, and completion handlers.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Objective-C interview questions

View all →