Diagnosing reference cycles
A view controller doesn't seem to leave memory after you close its screen. How would you confirm there's actually a reference cycle?
A view controller doesn't seem to leave memory after you close its screen. How would you confirm there's actually a reference cycle?
Put a log or breakpoint in deinit and see whether it fires; if not, pick that instance in the Memory Graph Debugger and follow the reference path to whoever holds it strongly. Instruments Leaks only shows unreachable memory, so it can miss a reference cycle.
Memory and ARCShort answerBasics
Think of a memory leak you actually ran into. How did you find it, how did you pin down…
#leak #memory-graph #deinit
Memory and ARCShort answerBasics
Are "reference cycle" and "memory leak" the same thing?
#retain-cycle #leak
Memory and ARCShort answerAdvanced
From the moment an object's last strong reference goes away until the memory is actually…
#deinit #weak
ArchitectureMultiple choiceAdvanced
In this Coordinator implementation, LoginCoordinator stays in memory after the login flow…
#retain-cycle #weak