thebushidocollective/han/objc-arc-patterns
Claude Code and agent skill by thebushidocollective/han
- community
Checking that the SKILL.md file is still in the repository.
Use when automatic Reference Counting in Objective-C including strong/weak references, retain cycles, ownership qualifiers, bridging with Core Foundation, and patterns for memory-safe code without manual retain/release.
Install
npx vskill@latest install thebushidocollective/han/objc-arc-patternsSKILL.md
Objective-C ARC Patterns
Introduction
Automatic Reference Counting (ARC) is Objective-C's memory management system that automatically inserts retain and release calls at compile time. ARC eliminates most manual memory management while providing deterministic memory behavior and preventing common memory bugs like use-after-free and double-free.
Unlike garbage collection, ARC provides immediate deallocation when reference counts reach zero, making it suitable for resource-constrained environments like iOS. Understanding ARC's ownership rules, qualifiers, and patterns is essential for writing memory-safe Objective-C code and avoiding retain cycles.
This skill covers strong and weak references, ownership qualifiers, retain cycles, Core Foundation bridging, and best practices for ARC-based memory management.
Strong and Weak References
Strong references maintain ownership of objects and prevent deallocation, while weak references observe objects without preventing deallocation.
Strong references increment retain count, while weak references are automatically set to nil when the object deallocates, preventing dangling pointers.
Retain Cycles and Breaking Them
Retain cycles occur when objects hold strong references to each other, preventing deallocation. Breaking cycles requires weak or unowned references.
Always use weak references for delegates, parent pointers, and observers to break retain cycles. Use the weak-strong dance in blocks for safe self access.
Ownership Qualifiers
ARC provides ownership qualifiers that explicitly control memory management behavior for variables and properties.
Choose copy for properties that accept mutable types like NSMutableString or NSMutableArray to prevent unexpected mutations.
Core Foundation Bridging
Core Foundation objects require explicit memory management and bridging to work correctly with ARC-managed Objective-C objects.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/languages/objective-c/skills/objc-arc-patterns/SKILL.md
Popularity
- Repository stars
- 198
- Repository forks
- 21
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thebushidocollective/han/objc-arc-patterns)