Allocations and Leaks Instruments
Tracking heap allocations, finding memory leaks and zombie objects.
Allocations Instrument
The Allocations instrument tracks every heap allocation and deallocation, showing memory growth over time.
// Instruments → Allocations template
// Shows live bytes, allocation count, and transient objectsHeap Growth Analysis
Exercise your app and watch the Live Bytes graph. Steady growth without plateauing indicates a memory leak.
// Normal: allocations rise and fall as views appear/disappear
// Leak: allocations only grow, never releasedAll lessons in this course
- Instruments Basics: Time Profiler
- Allocations and Leaks Instruments
- Main Thread Checker and Hangs
- Optimising Hot Paths: COW, Inlining and Specialisation