ios - Are NSManagedObject's retain cycles still possible? -


according documentation there have bother about: memory leaks. https://developer.apple.com/library/mac/documentation/cocoa/conceptual/coredata/articles/cdmemory.html:

breaking relationship strong reference cycles

when have relationships between managed objects, each object maintains strong reference object or objects related. can cause strong reference cycles. ensure reference cycles broken, when you're finished object can use managed object context method refreshobject:mergechanges: turn fault.

you typically use refreshobject:mergechanges: refresh managed object’s property values. if mergechanges flag yes, method merges object’s property values of object available in persistent store coordinator. if flag no, however, method turns object fault without merging, causes break strong references related managed objects. breaks strong reference cycle between managed object , other managed objects.

note that, of course, before managed object can deallocated there must no strong references it, including outside of core data. see change , undo management.

but. there not apple's code examples problem solved. i've checked topsongs, iphonecoredatarecipes, coredatabooks, threadedcoredata sample projects, none of them has respect problem. mean object relationships weak days?

the object relationships not weak. using arc , knows how handle these reference cycles properly.

note: documentation old , suggest reading updated guide.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -