axiom-memory-debugging

Identify and fix memory leaks in iOS/macOS apps using Memory Graph Debugger and Instruments.

3|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/harivansh-afk/claude-code-vertical --skill axiom-memory-debugging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axiom-memory-debugging
Source: https://github.com/harivansh-afk/claude-code-vertical/tree/main/skill-index/skills/axiom-memory-debugging
Command: npx skills add https://github.com/harivansh-afk/claude-code-vertical --skill axiom-memory-debugging

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers identify and fix memory leaks in iOS and macOS apps, reducing crashes and improving stability by addressing common patterns like retain cycles, timer leaks, and not deallocating objects.

Core Features & Use Cases

  • Memory Graph Debugger analysis to detect retain cycles and object growth
  • Instruments memory profiling workflows to quantify leaks and track allocations
  • Lifecycle checks for deallocation of view controllers and view models, and ensuring observers are deregistered
  • Pattern catalog and fixes for timers, notifications, closures, delegates, and strong reference cycles
  • Use cases include debugging a view that leaks after navigation, a timer-based leak, or a notification observer not removed

Quick Start

Use Memory Graph Debugger to locate leaks, inspect the retain cycle chains, and apply recommended fixes to prevent deallocation issues.

Frequently Asked Questions about axiom-memory-debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a retain cycle causing memory leaks in my iOS app?

Use Memory Graph Debugger in Xcode to locate retain cycles and inspect object reference chains. It captures memory snapshots to visualize strong references preventing deallocation, helping you identify which closures or delegates hold objects alive.

Why does my view controller not deallocate after navigation in macOS or iOS?

Your view controller fails to deallocate after navigation due to strong reference cycles in closures, active timers, or notification observers that were not removed. Profiling with Instruments can quantify these leaks and track the specific allocations keeping the object alive.

What is the best way to debug timer and observer leaks in iOS?

The best way to debug timer and observer leaks is using Instruments memory profiling to track allocations and Memory Graph Debugger to trace reference chains. Ensure proper deinitialization and deregistration of observers to prevent these common lifecycle leaks.

Can I use Instruments to profile memory leaks in a macOS app?

Yes, you can use Instruments to profile memory leaks in a macOS app. Instruments memory profiling workflows quantify leaks and track allocations across timers, observers, and closures, while Memory Graph Debugger helps inspect the specific retain cycle chains.

How do I stop Combine cancellables from leaking in production Swift code?

To stop Combine cancellables from leaking in production Swift code, store subscriptions in a collection tied to the object's lifecycle. This ensures proper deinitialization and prevents retain cycles that keep view models and observers alive unnecessarily.

Does Memory Graph Debugger work for finding closure leaks in iOS?

Yes, Memory Graph Debugger works for finding closure leaks in iOS by capturing memory snapshots and inspecting strong reference chains. It helps identify where closures capture self strongly, allowing you to apply weak self patterns to resolve the deallocation issue.