diff --git a/WordPress/Classes/ViewRelated/Site Creation/Design Selection/Preview/TemplatePreviewViewController.swift b/WordPress/Classes/ViewRelated/Site Creation/Design Selection/Preview/TemplatePreviewViewController.swift index ce751926e2f5..174da4386d9a 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/Design Selection/Preview/TemplatePreviewViewController.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/Design Selection/Preview/TemplatePreviewViewController.swift @@ -1,7 +1,7 @@ import Foundation -protocol TemplatePreviewViewDelegate { +protocol TemplatePreviewViewDelegate: AnyObject { typealias PreviewDevice = PreviewDeviceSelectionViewController.PreviewDevice func deviceButtonTapped(_ previewDevice: PreviewDevice) func deviceModeChanged(_ previewDevice: PreviewDevice) @@ -20,7 +20,7 @@ class TemplatePreviewViewController: UIViewController, NoResultsViewHost, UIPopo @IBOutlet weak var footerView: UIView! @IBOutlet weak var progressBar: UIProgressView! - internal var delegate: TemplatePreviewViewDelegate? + internal weak var delegate: TemplatePreviewViewDelegate? private let demoURL: String private var estimatedProgressObserver: NSKeyValueObservation? internal var selectedPreviewDevice: PreviewDevice { diff --git a/WordPress/Classes/ViewRelated/Site Creation/Site Segments/SiteSegmentsStep.swift b/WordPress/Classes/ViewRelated/Site Creation/Site Segments/SiteSegmentsStep.swift index de72b3c28418..3b8fdde0de34 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/Site Segments/SiteSegmentsStep.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/Site Segments/SiteSegmentsStep.swift @@ -8,7 +8,7 @@ final class SiteSegmentsStep: WizardStep { return SiteSegmentsWizardContent(service: self.service, selection: self.didSelect) }() - var delegate: WizardDelegate? + weak var delegate: WizardDelegate? init(creator: SiteCreator, service: SiteSegmentsService) { self.creator = creator