아키텍처객관식
Coordinator 메모리 관리
다음 Coordinator 구현에서 로그인 플로우가 끝난 뒤에도 LoginCoordinator가 메모리에 남습니다. 원인으로 가장 알맞은 것은?
final class AppCoordinator {
var children: [Coordinator] = []
func showLogin() {
let child = LoginCoordinator(nav: nav)
child.onFinish = { self.children.removeAll { $0 === child } }
children.append(child); child.start()
}
}하나만 선택