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

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

c++ - llvm function pass ReplaceInstWithInst malloc -

python - IO.UnsupportedOperation: Not Writable -