Quiz
Lifecycle Callbacks vs Object Deallocation
Understand why side-effect cleanup belongs in different lifecycle hooks depending on scope.
A UIViewController starts a repeating Timer in viewWillAppear and subscribes to a NotificationCenter observer in init. It is pushed and popped repeatedly within a UINavigationController. Where should each side effect be torn down to avoid leaks AND duplicate work, given that a covered (but not popped) controller still stays alive?