iOS face questions

Source: Internet
Author: User
  1. What is the difference between Nsarray and Nsmutablearray (thread orientation)?
    Nsarray is thread-safe, Nsmutablearray is thread insecure, multi-threaded use requires manual lock-in Nslock or use @synchronized adornments.
  2. Autorelease Pool Implementation principle?
    Using the @ @autoreleasepool decoration in arc requires the code to be manually added to the release pool. Probably means autorelease pool internal for a doubly linked list, each linked list element is a page, each page is a stack, detailed implementation mechanism here, although not very understand, I feel like the blogger is writing well.
  3. iOS sandbox mechanism
    By default, each sandbox contains 3 folders: Documents, Library, and TMP. Applications can only read and write files in several directories because of the sandboxed mechanism applied
    Documents: Apple recommends that file data that is created in the program or browsed in the program be saved in this directory, which is included in itunes backup and restore
    Library: The default settings or other status information of the stored program;
    Library/caches: Store cached files, itunes does not back up this directory, files in this directory will not be deleted in the app exit
    TMP: Provides a place to create temporary files on the fly.
    itunes backs up all documents and library files while syncing with the iphone.
    When the iphone restarts, all of the TMP files are discarded.

iOS face questions

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.