ios - UIImage Caching cause memory high -


consider:

+(nullable uiimage *)imagenamed:(nsstring *)name; 

i use method so:

uiimage *image = [uiimage imagenamed:@"test"]; 

but image's type png.

enter image description here

in project, loads lot of different images.

so, cache hight

enter image description here

your images huge. 3001*4057 12 million pixels. theres 3 bytes in 1 pixel (one byte red, green , blue each), image size have 12million * 3 bytes, 36mb per image.

i scale down image size if can.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -