Daily iOS
Performance and debugging

Leak investigation with Instruments

Opening and closing a certain screen repeatedly makes the app's memory keep growing. In what order would you use Leaks, Allocations, and the Memory Graph?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Start with Allocations, marking a generation every time you open and close the screen to find which objects survive each generation, then pick that object in the Memory Graph to see the reference path of who's holding it, and run Leaks last as a supplement, since it only catches unreachable memory.

Share a question