mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #451] possible retention loop with SafariURLHandler #295
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#295
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shaibt on GitHub (Apr 11, 2018).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/451
Description:
Hi,
Seems that these 2 classes hold strong references to each other:
SafariURLHandlerholds a strong reference toOAuthSwiftthrough itsoauthSwiftpropertyOAuthSwiftholds a strong reference toSafariURLHandlerthrough itsauthorizeURLHandlerpropertyIs this by design? when using the
SafariURLHandleras shown in the docs I get a retention cycle and neither of the two get released as a result.OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
@phimage commented on GitHub (Apr 12, 2018):
by design...
But yes! we need a weak reference in SafariURLHandler to break the cycle
You could PR if you want
https://github.com/krzysztofzablocki/LifetimeTracker
@shaibt commented on GitHub (Apr 12, 2018):
Done.
See PR: https://github.com/OAuthSwift/OAuthSwift/pull/452
@phimage commented on GitHub (Apr 12, 2018):
merged thanks you!
ps: next time you can put Fix #451 in your commit message to auto-close the issue