Skip to content

Commit

Permalink
fix: ContainerView로부터 메모리 해제함
Browse files Browse the repository at this point in the history
  • Loading branch information
JYPjoy committed Mar 5, 2024
1 parent acea3b2 commit 1e50e07
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ final class FriendsViewController: UIViewController, SnapKitInterface {
override func viewDidLoad() {
addComponents()
setConstraints()
binding()
}

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
fetchData()
binding()
}

override func viewDidDisappear(_ animated: Bool) {
innerView?.removeFromSuperview()
containerView.subviews.forEach { $0.removeFromSuperview() }
}

func addComponents() {
Expand Down Expand Up @@ -121,6 +121,5 @@ final class FriendsViewController: UIViewController, SnapKitInterface {
}
}
.store(in: &cancellable)

}
}

0 comments on commit 1e50e07

Please sign in to comment.