Blocks, note

Source: Internet
Author: User

Blocks

1. Thread blocking.

2. Statement block, similar to the function pointer in C language.

(Note !!) 3. Memory cyclic reference: blocks reserves a strong pointer reference for the objects in the starting statement block. If the object also retains a strong pointer reference for the block, it will be applied cyclically, so that both objects cannot be released from the heap.

 

Applicable blocks:

1, enumeration. enumeration.

2. view animation. uiview.

3. Sorting. sort.

4. Notification. event.

5, error handlers.

6, completion handlers.

7 (most important): multi-core multi-thread (GCD), Standard c api form, and UI-related operations are all executed in the main thread.

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.