Finding who holds a view controller
You closed a UIKit screen but its ViewController stays in memory. Without just trusting the deinit log, how would you find who's holding it?
You closed a UIKit screen but its ViewController stays in memory. Without just trusting the deinit log, how would you find who's holding it?
Right after closing the screen, capture Xcode's Debug Memory Graph, pick the ViewController instance that's still there, and follow the retainer list in the right inspector and the incoming arrows in the graph to see which of a Timer, a NotificationCenter block observer, or a closure context holds it strongly.
Memory and ARCShort answerBasics
A view controller doesn't seem to leave memory after you close its screen. How would you…
#memory-graph
Memory and ARCMultiple choiceBasics
Which of the following (with no extra measures) create a reference cycle or a permanent…
#timer
Memory and ARCMultiple choiceBasics
Which of the following snippets keep a ViewController from being deallocated after it…
#timer
Memory and ARCShort answerBasics
Think of a memory leak you actually ran into. How did you find it, how did you pin down…
#memory-graph