Core Data Memory Management

前端 未结 2 1382
鱼传尺愫
鱼传尺愫 2021-02-04 14:08

I\'ve read the memory management sections in the Core Data docs and I\'m still a little confused. I have one context in my app, and I have several things getting objects out of

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 14:42

    Yes, CoreData will fault things back that you are not using. It has caches and various other things, so the data might not be released immediately, but in general it is very good about memory management and dealing with keeping its footprint as small as possible.

    If you have a particularly odd usage profile you can explicitly force objects back into faults, but that is generally not necessary, and I would not consider doing that unless I actually had some actual profiling data saying I was under memory pressure.

提交回复
热议问题