Custom KeyBoard get terminated due to memory pressure in iOS 8

后端 未结 3 638
小蘑菇
小蘑菇 2020-12-16 04:23

Custom KeyBoard get terminated due to memory pressure in iOS 8

Initially my custom keyboard is taking around 25mb of memory, but this memory is not deallocated with

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 05:00

    The keyboard extension runs in a process that persists after the keyboard disappears. Your keyboards view controller is created anew each time your keyboard is created, but the process that view controller is in persists. So free memory when your view controller is closed. If you are using images you won't want to use imageNamed: you will want to use imageWithContentsOfFile:. Because UIImage uses a cache for imageNamed that will persist.

提交回复
热议问题