How to properly trim object graph brought in by NSFetchedResultsController?

前端 未结 2 1555
终归单人心
终归单人心 2021-01-25 05:29

Without reference cycles NSFetchedResultsController can turn its managed objects into fault properly when they are not needed. But with reference cycles, it not, so

2条回答
  •  深忆病人
    2021-01-25 05:59

    As I mentioned in my comments HERE, the FRC is responsible to fault-in or fault-out the objects it fetched.
    Which in turn break any strong reference cycles between your managed objects.

    You can test this by setting a breakpoint in your objects willTurnIntoFault method when scrolling a large enough table.

    This is done with no regards as to what other objects reference these fetched objects (as far as I can tell).

提交回复
热议问题