diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Common/Calendar/CalendarView.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Common/Calendar/CalendarView.swift index 026036ad..7b7c7daf 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Common/Calendar/CalendarView.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Common/Calendar/CalendarView.swift @@ -11,7 +11,7 @@ import FSCalendar import Then import SnapKit -protocol CalendarViewDelegate { +protocol CalendarViewDelegate: AnyObject { func todayBtnTapped() } @@ -22,7 +22,7 @@ final class CalendarView: UIView { let today = Date() var monthCalendarClosure: ((_ month: String) -> Void)? - var delegate: CalendarViewDelegate? + weak var delegate: CalendarViewDelegate? // MARK: - UI Components diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/HomeDataSource.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/HomeDataSource.swift index 4060b807..2b68d6ed 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/HomeDataSource.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/HomeDataSource.swift @@ -7,7 +7,7 @@ import UIKit -protocol HomeModalDelegate { +protocol HomeModalDelegate: AnyObject { func updateMissionStatus(id: Int, status: CompletionStatus) func modifyMission(id: Int, type: MissionType) @@ -37,7 +37,7 @@ final class HomeDataSource { private var missionList: [DailyMissionResponseDTO] var dataSource: DataSource? - var modalDelegate: HomeModalDelegate? + weak var modalDelegate: HomeModalDelegate? // MARK: - UI Components