Using __weak to Break Retain Cycles in Objective-C ARC
Learn how to use __weak delegates and the weak-strong block pattern to eliminate retain cycles in Objective-C ARC while keeping APIs explicit about object lifetime.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to use __weak delegates and the weak-strong block pattern to eliminate retain cycles in Objective-C ARC while keeping APIs explicit about object lifetime.
Adopt Objective‑C nullability annotations in a mixed Swift/Obj‑C project to improve Swift interop, catch nil bugs at compile time, and preserve runtime behaviour. Follow this step‑by‑step guide to wrap headers, annotate pointers, and verify changes.
Learn how to enable ARC per file in an Objective‑C project, verify the setup with build logs and Instruments, and understand the limits when bridging Core Foundation objects.
How to break strong reference cycles in Objective-C blocks using the __weak-strong pattern to prevent memory leaks under ARC.
Learn how to enable ARC for a single Objective‑C file in a mixed‑mode Xcode project, verify the compiler inserts retain/release calls, and revert the change if needed.
Learn how to use @property and @synthesize in Objective-C to reduce boilerplate, manage memory with ARC, and implement custom state validation.
A concise decision guide for enabling ARC in Objective‑C projects, covering constraints, option trade‑offs, a sample implementation, and validation steps.
ARC eliminates manual retain/release calls, but choosing it requires understanding weak refs, migration steps, and potential pitfalls. This post walks through the decision, a practical migration example, and how to verify the result.
Learn how to resolve EXC_BAD_ACCESS crashes in Objective-C by using Zombie Objects to identify dangling pointers and fixing improper reference types.