Discover memory leaks with Testcase
summary
Describes an automated memory-leak detection technique for Swift using XCTest plus Mirror and weak-box wrappers: reflect an object’s stored properties, place any class instances into weak containers, and assert they become nil after the owning view controller is deallocated. Explains practical pitfalls such as casts through Any, Optional double-wrapping, and differences between structs and classes, and notes a limitation that Mirror itself can increase a reference count and produce false positives.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:53Memory leak causes
- 4:49Preventing leaks
- 7:19Leak detection with test cases
- 11:00Implementation challenges
- 18:20Summary and demo
- 20:16Q&A
related talks
46mFighting Memory Leaks: From Task to Victory
17mEnding the Plague of Memory Leaks
31mLooking Through the Mirror
50mWriting Swift code with great testability
26mTesting the Tricky Stuff
39mCrash Course on Crashes
57mExploring Swift Memory Layout
30mUnlocking the Power of Swift Testing: Modern Approaches to Testing iOS Apps
