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

Retain Cycle Question #807

Closed
ShadyGhalab opened this Issue Feb 16, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@ShadyGhalab

ShadyGhalab commented Feb 16, 2013

can understand me why return self Object to __Strong in Block Like This

__weak __typeof(&*self)weakSelf = self;

AFNetworkReachabilityStatusBlock callback = ^(AFNetworkReachabilityStatus status) {

    __strong __typeof(&*weakSelf)strongSelf = weakSelf;

    if (!strongSelf) {
        return;
    }

    strongSelf.networkReachabilityStatus = status;

    if (strongSelf.networkReachabilityStatusBlock) {
        strongSelf.networkReachabilityStatusBlock(status);
    }
}
@mattt

This comment has been minimized.

Show comment
Hide comment
@mattt

mattt Feb 18, 2013

Contributor

This is not the place to be asking general questions—GitHub issues is for reporting bugs and requesting features.

Please read Apple's documentation on ARC, or ask a question on Stack Overflow.

Contributor

mattt commented Feb 18, 2013

This is not the place to be asking general questions—GitHub issues is for reporting bugs and requesting features.

Please read Apple's documentation on ARC, or ask a question on Stack Overflow.

@mattt mattt closed this Feb 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment