IOS Crash Issue warning error 2

Source: Internet
Author: User
Capturing ' self ' strongly in this block are likely to leads to a retain cycle

__block Viewcontroller *controller = self;
[_tableview setpulltorefreshhandler:^{
[Controller Datadidrefresh:nil];
}];

The _block tag tells the compiler that this variable needs special handling in the block.

In general, the value of the variable used in the block is copied, so the modification of the variable itself does not affect the actual value of the variable. And when we mark it with __block, it means that the change in the block is also effective outside the block.

IOS Crash Issue warning error 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.