[Reading Notes] iOS-optimized memory and Reading Notes ios-optimized
ImageNamed: Creates a UIImage object by using the method. When these objects are no longer used, they are placed in the default automatic recycle pool of the application, instead of the automatic recycle pool of the current event loop, the memory occupied by such objects is recycled only when the application ends. If you use this method to store a lot of images, you will find that the application will soon tighten the entire memory. In addition, because they are automatically recycled objects, even if you receive a memory warning, you cannot recycle the memory used by these objects. Therefore, please use this method with caution. It is best to use it only on small images.
It is generally not recommended to copy large images to the project, which will lead to great potential and problems during release, for example, applications larger than a certain size cannot be directly downloaded from the App Store on the mobile phone network. In this case, users may be missed. However, in addition to large files, you can package small images such as small icons and logos into applications.