Open Source · Apache 2.0

Find Memory Leaks
in Your iOS Tests

Per-test memory leak detection for XCTest, powered by the native macOS leaks tool. Catch retain cycles before they ship.

$ brew install amanjeetsingh150/tap/xctestleaks
$ xctestleaks run --project MyApp.xcodeproj --scheme MyAppTests --destination "platform=iOS Simulator,name=iPhone 16"

12 tests run · 3 leaks detected · 2 retain cycles found
Report saved to leak_artifacts/report.html

See It in Action

Built for Real iOS Testing

Everything you need to catch memory leaks in your test suite, from local development to CI.

🔍

Per-Test Leak Detection

Every test method gets its own leak check. Know exactly which test introduced a memory leak, not just that one exists somewhere.

🔄

Retain Cycle Identification

Distinguish between simple root leaks and circular references. XCTestLeaks identifies retain cycles so you can trace the exact reference chain.

📊

Interactive HTML Reports

Beautiful dark-themed reports with filtering by leak type, expandable details, and per-leak artifact exports in JSON and raw format.

⚙️

CI Ready

Single command to run your full test suite with leak detection. Generates structured artifacts perfect for CI pipelines and automated workflows.

Leaks Found & Fixed in Open Source

Memory leaks discovered using XCTestLeaks in major open-source projects, with fixes contributed upstream.

Firefox for iOS

mozilla-mobile/firefox-ios
  • Merged Fix for retain cycle between UI kit references in SecondaryButton #18751
  • Merged Fix for memory leak retain cycle in downloading documents #31488

What People Are Saying

👤
"Finally, a tool that makes leak detection part of the test workflow." Running leaks manually after every change was unsustainable. XCTestLeaks made it automatic and caught things we'd been missing for months.
Name Here — Senior iOS Engineer @ Company
👤
"The per-test granularity is a game changer." We went from "there's a leak somewhere in 200 tests" to knowing exactly which test method introduced it. Saved us hours of debugging.
Name Here — iOS Tech Lead @ Company
👤
"We integrated it into our CI pipeline in under 10 minutes." The single-command interface and structured JSON output made it trivial to add to our existing GitHub Actions workflow.
Name Here — Platform Engineer @ Company