gitwtfhub

wtf is fbretaincycledetector?

cdoky/fbretaincycledetector — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2023-08-13

Objective-C++Audience · developerComplexity · 3/5DormantSetup · moderate

TL;DR

An iOS debugging tool from Facebook that automatically scans an object's memory graph to find retain cycles, the hidden loops that cause memory leaks.

Mindmap

mindmap
  root((repo))
    What it does
      Finds retain cycles
      Scans object graph
      Filters false positives
    Tech stack
      Objective-C plus plus
      iOS debugging
    Use cases
      Memory leak detection
      NSTimer cycle checks
      Pre-release debugging
    Audience
      iOS developers
      Facebook engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Pass a suspected object into the detector to automatically find retain cycles causing a memory leak.

REASON 2

Filter out known false-positive cycles from Apple's own frameworks, like UIView's internal caching.

REASON 3

Catch NSTimer-related retain cycles, a common source of iOS memory leaks.

REASON 4

Use during development and testing to catch memory leaks before they ship to users.

What's in the stack?

Objective-C++iOS

How it stacks up

cdoky/fbretaincycledetectorjonluca/node-mac-permissionsogham/rust-bbedit
Stars39
LanguageObjective-C++Objective-C++Objective-C++
Last pushed2023-08-132023-04-182019-03-14
MaintenanceDormantDormantDormant
Setup difficultymoderatemoderateeasy
Complexity3/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Meant for debug builds only, pairs with the companion tool FBMemoryProfiler for whole-app scanning.

Yoink these prompts

Prompt 1
Show me how to use FBRetainCycleDetector to check a view controller for retain cycles.
Prompt 2
Explain how this tool traces an object graph to find cycles like A points to B points to C points back to A.
Prompt 3
How do I configure FBRetainCycleDetector to ignore known false positives from Apple's frameworks?
Prompt 4
Walk me through combining this with FBMemoryProfiler to scan my whole app for leaks.

Frequently asked questions

wtf is fbretaincycledetector?

An iOS debugging tool from Facebook that automatically scans an object's memory graph to find retain cycles, the hidden loops that cause memory leaks.

What language is fbretaincycledetector written in?

Mainly Objective-C++. The stack also includes Objective-C++, iOS.

Is fbretaincycledetector actively maintained?

Dormant — no commits in 2+ years (last push 2023-08-13).

How hard is fbretaincycledetector to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is fbretaincycledetector for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.