"Reading notes" ios-optimizing memory

Source: Internet
Author: User

Imagenamed: Method creates UIImage objects that are no longer in use and are placed in the default auto-recycle pool of the app, rather than in the auto-recycle pool of the current event loop, so that the memory used by such objects is recycled only at the end of the application. If you store a lot of them in this way, you will find that the application will quickly keep the whole memory tight. Also, because they are objects that are automatically recycled, you cannot reclaim the memory used by these objects even if you receive a memory warning. Therefore, please use this method carefully, preferably only on the small picture.

It is usually not recommended to copy large images into the project, which will make it very large and will encounter some problems when publishing, for example, more than a certain size of the application can not be downloaded from the App Store directly under the mobile network, so you may miss some users. However, in addition to large files, small icons and logo and other small images packaged into the application is possible.

"Reading notes" ios-optimizing memory

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.