Summary of ARC and MRC, and summary of arcmrc

Source: Internet
Author: User

Summary of ARC and MRC, and summary of arcmrc

ARC and MRC Memory Management

From MRC-> ARC is to transfer the memory management part from the developer's function to the runtime outside the function. since the development of runtime is simple and the logic level is high, the chance of runtime errors is very small. In addition, the compiler optimization makes the running speed very high.

Features of ARC:

  • Call dealloc, retain, and release that cannot be displayed (the [super dealloc] method cannot be called in the Custom delloc method of ARC. the @ selector (retain) and @ selector (release) methods cannot be called)
  • NSAllocateObject and NSDeallocateObject cannot be used to create and release objects.
  • The Object Pointer cannot be used in the C-language struct.
  • Id and void * cannot be converted at will
  • You cannot use the NSAID utoreleasepool object.
  • The memory zone cannot be used. in order to automatically retain-release, ARC has made some restrictions on memory management, that is, it cannot name the compiler name starting with "new", that is, it cannot name attributes starting with "new, unless a getter method with different life cycles is specified.

Related Article

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.