Finding Retain Cycles for Objective-C with Pulse
summary
Built a Pulse-based checker that finds Objective‑C retain cycles by walking the Pulse abstract heap and requiring all references in a cycle to be strong; closures are modeled as objects with captured variables as fields so block captures become heap edges. The checker reports cycles as soon as they appear (trading more reports for occasional false positives), adds a reported retain cycle attribute to avoid duplicates, and fixes missing weak/strong info by storing a boolean on fields—raising detection to 100% on known tests.
AI-written summary · about
chapters (10)
- 0:00Pulse and retain cycles
- 3:40Retain cycle checker
- 10:04Strong and weak references
- 13:18Cycles with Objective-C blocks
- 14:22Testing false positives
- 17:56False negatives and limits
- 21:36Cycle detection beyond two
- 22:49Swift and other languages
- 24:39Real-world impact
- 27:17IDE integration
related talks
31mMemory Graph Debugger
59mUnder-approximation for Scalable Bug Detection
42mTuning your app using Xcode's Instruments
49mPokeLeaks: Gotta Catch 'em All
55mUsing the Valgrind Framework to Build a Persistent Memory Error Detector
20mDiscover memory leaks with Testcase
20mMisconceptions About Loops in C
36mApple's Predicament: NSPredicate Exploits on iOS and macOS
