Skip to content

Commit

Permalink
Merge pull request #21066 from wordpress-mobile/weak-delegate-violati…
Browse files Browse the repository at this point in the history
…on-fixes-7

Fix retain cycles in Site Creation
  • Loading branch information
crazytonyli authored Jul 18, 2023
2 parents 313d9dd + 1ecffdc commit fe10fe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import Foundation

protocol TemplatePreviewViewDelegate {
protocol TemplatePreviewViewDelegate: AnyObject {
typealias PreviewDevice = PreviewDeviceSelectionViewController.PreviewDevice
func deviceButtonTapped(_ previewDevice: PreviewDevice)
func deviceModeChanged(_ previewDevice: PreviewDevice)
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe10fe4

Please sign in to comment.