I couldn't think of core data refer to anything outside coredata. So there is no way there will be reference cycle. At most core data object points to another coredata objects.
however, I may be wrong.
Managedobjectcontext do not hold strong reference to core data.
Is there any guide here?
Is there any guide here?
Here is a link to Core Data Programming Guide: Object Lifetime Management.
It was updated on July 2014, so it may have new information not published when you asked this question.
By default, though, the references between a managed object and its context are weak. This means that in general you cannot rely on a context to ensure the longevity of a managed object instance, and you cannot rely on the existence of a managed object to ensure the longevity of a context. Put another way, just because you fetched an object doesn’t mean it will stay around.
The exception to this rule is that a managed object context maintains a strong reference to any changed
This means your references to NSManagedObject subclasses (Core Data objects) should be strong.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With