Core Data: avoiding retain cycles in to-many relationships

后端 未结 3 995
感情败类
感情败类 2021-02-07 12:28

I\'m still learning my way through iOS development and working with Core Data and have just come across retain cycles.

It is my understanding from reading the Core Data

3条回答
  •  没有蜡笔的小新
    2021-02-07 12:46

    My experience is that re-faulting only the department entity is enough to break the retain cycle. Profiling memory clearly shows that all related employees are then freed, unless they are retained elsewhere by your code.

提交回复
热议问题