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
Everything you need to catch memory leaks in your test suite, from local development to CI.
Every test method gets its own leak check. Know exactly which test introduced a memory leak, not just that one exists somewhere.
Distinguish between simple root leaks and circular references. XCTestLeaks identifies retain cycles so you can trace the exact reference chain.
Beautiful dark-themed reports with filtering by leak type, expandable details, and per-leak artifact exports in JSON and raw format.
Single command to run your full test suite with leak detection. Generates structured artifacts perfect for CI pipelines and automated workflows.
Memory leaks discovered using XCTestLeaks in major open-source projects, with fixes contributed upstream.
"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.
"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.
"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.