ARC deallocation steps
From the moment an object's last strong reference goes away until the memory is actually returned, what does ARC do? Walk me through it step by step.
From the moment an object's last strong reference goes away until the memory is actually returned, what does ARC do? Walk me through it step by step.
release → strong count hits 0 → deinit (subclass, then parent) → stored properties are released, freeing child objects in a chain → weak references read as nil from then on, and if unowned references remain the memory stays until the unowned count hits 0 → free.
Memory and ARCShort answerIntro
A coworker wants to declare every delegate unowned instead of weak because unwrapping…
#arc #weak #unowned
Memory and ARCMultiple choiceIntro
Which of the following statements about weak references are correct? Select all that…
#weak #unowned
Memory and ARCShort answerBasics
A view controller doesn't seem to leave memory after you close its screen. How would you…
#deinit #weak
Memory and ARCShort answerBasics
When would you use unowned instead of weak?
#weak #unowned