axiom-memory-debugging

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

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/pradeepmouli/swift-template --skill axiom-memory-debugging-pradeepmouli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axiom-memory-debugging
Source: https://github.com/pradeepmouli/swift-template/tree/main/.agents/skills/axiom-memory-debugging
Command: npx skills add https://github.com/pradeepmouli/swift-template --skill axiom-memory-debugging-pradeepmouli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Memory issues in iOS/macOS apps can cause crashes and degraded performance. This skill provides a disciplined, repeatable workflow to detect and fix memory leaks, retain cycles, and improper timer/observer usage.

Core Features & Use Cases

  • Systematic memory-diagnostic workflows using Memory Graph Debugger and Instruments to isolate leaks
  • Patterns coverage: retain cycles, timer/observer leaks, closure captures, and view-controller deallocation checks
  • Use case: when an app exhibits memory growth over time or unexpected crashes due to memory pressure, apply the steps to locate and fix leaks

Quick Start

Follow the Memory Graph Debugger workflow to locate leaks, then use Instruments memory profiling to verify the fix.

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 memory leaks and retain cycles in Swift apps?

Fix memory leaks in Swift by using the Memory Graph Debugger to isolate retain cycles and improper closure captures, then verify the deallocation fix with Instruments memory profiling. This systematic workflow prevents crashes caused by sustained memory growth.

What is the best way to diagnose iOS app memory growth during QA?

Diagnose iOS app memory growth during QA by running a disciplined diagnostic workflow that checks view-controller deallocation, timer leaks, and observer patterns. Use the Memory Graph Debugger to locate the exact leak and apply the recommended fix.

Does the Memory Graph Debugger work for finding closure captures and timer leaks?

Yes, the Memory Graph Debugger is effective for finding closure captures, timer leaks, and observer retain cycles. It provides step-by-step diagnostic patterns to isolate these specific memory leak types within your iOS or macOS app.

How do I check if a view controller is not deallocating properly in Swift?

Check view-controller deallocation in Swift by applying deallocation checks during development and QA. If the view controller remains in memory, use Instruments memory profiling to trace the active retain cycle or observer keeping it alive.

When should I use Instruments vs the Memory Graph Debugger for memory profiling?

Use the Memory Graph Debugger to surgically isolate and locate specific retain cycles, then use Instruments memory profiling to verify the fix and track overall memory growth over time. Both are required for complete leak resolution.