Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Jetpack connection delegates to weak references #21052

Merged
merged 6 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
22.9
-----
* [*] Fix memory leaks in setting up Jetpack connection. [#21052]

22.8
-----
* [*] Blogging Reminders: Disabled prompt for self-hosted sites not connected to Jetpack. [#20970]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Gridicons
import WordPressAuthenticator
import Combine

protocol JetpackConnectionWebDelegate {
protocol JetpackConnectionWebDelegate: AnyObject {
func jetpackConnectionCompleted()
func jetpackConnectionCanceled()
}
Expand All @@ -13,7 +13,7 @@ class JetpackConnectionWebViewController: UIViewController {
let blog: Blog
let webView: WKWebView
let progressView = WebProgressView()
var delegate: JetpackConnectionWebDelegate?
weak var delegate: JetpackConnectionWebDelegate?

// Sometimes wp-login doesn't redirect to the expected URL, so we're storing
// it and redirecting manually
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ open class JetpackConnectionViewController: UITableViewController {

// MARK: - Public Properties

@objc var delegate: JetpackConnectionDelegate?
@objc weak var delegate: JetpackConnectionDelegate?

// MARK: - Initializer

Expand Down