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

Prevent memory leaks #40

Merged
merged 5 commits into from
Jan 16, 2025
Merged

Prevent memory leaks #40

merged 5 commits into from
Jan 16, 2025

Conversation

Kyome22
Copy link
Contributor

@Kyome22 Kyome22 commented Jan 9, 2025

Since WKWebViewConfiguration, WKUIDelegate, and WKNavigationDelegate are referenced in WKWebView, it is better that they are weakly referenced in the WebView.
Although no specific problems have been found, I think it will help prevent problems.

@Kyome22 Kyome22 requested a review from b1ackturtle January 9, 2025 07:43
@b1ackturtle
Copy link
Collaborator

Good catch, thank you.
To ensure that property references work as expected, could you please implement the unit tests?

@Kyome22
Copy link
Contributor Author

Kyome22 commented Jan 13, 2025

@b1ackturtle
I added unit tests and passed them.
https://github.com/cybozu/WebUI/actions/runs/12741480291

Copy link
Collaborator

@b1ackturtle b1ackturtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding the unit tests!
Could you check the additional comments I left in the review?

Tests/WebUITests/WebViewTests.swift Outdated Show resolved Hide resolved
Tests/WebUITests/WebViewTests.swift Outdated Show resolved Hide resolved
Copy link
Collaborator

@b1ackturtle b1ackturtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for addressing all the feedback.

@b1ackturtle b1ackturtle merged commit 92018cb into main Jan 16, 2025
1 check passed
@b1ackturtle b1ackturtle deleted the fix-memory-leak branch January 16, 2025 08:01
Kyome22 added a commit that referenced this pull request Jan 22, 2025
Kyome22 added a commit that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants