Is there a way to clear the cache used by UIImage class?

后端 未结 4 1473
闹比i
闹比i 2020-12-06 09:22

It is well known that UIImage caches its image data when the image is loaded using the imageNamed: method.

From apple documentation: https://developer.a

4条回答
  •  春和景丽
    2020-12-06 09:23

    There is no way I know of to manually clear this iOS managed cache. In general, this is a red herring. When the os manages something for you, you don't need to worry about it. As long as you are correctly releasing anything you alloc/retain and handling memory warnings appropriately you're doing your part.

提交回复
热议问题