mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #276] IOS10 Crash of '[unowned self]' #165
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#165
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 @zenyuhao on GitHub (Sep 21, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/276
== Describe here the steps to reproduce, with error message if any, and your code if relevant ==
Hi, I found a bug (maybe) in IOS10
look at this line, the code
[unowned self]may cause a crash in ios10 , it will not happen in ios9and i debug it, the self may be already released
It generally happens at app launch
and i try to delete the "unowned self",it works well, no crash anymore。
dose any thing wrong with it?
forgive my poor english
@phimage commented on GitHub (Sep 21, 2016):
"unowned self" must be replaced by "weak self" here
with
"guard let this = self else { OAuthSwift.retainError(failure); return }"
keep a reference to your oauthSwift object and it will be not released
@zenyuhao commented on GitHub (Sep 21, 2016):
3ks , got it, not notice that master has been repaired
3ks again