explaingit

cdoky/fbretaincycledetector

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

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

TLDR

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

What do people build with it?

USE CASE 1

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

USE CASE 2

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

USE CASE 3

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

USE CASE 4

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

What is it built with?

Objective-C++iOS

How does it compare?

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 get it running?

Difficulty · moderate Time to first run · 30min

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

Copy-paste 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

What 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.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.