Is NSManagedObjects between ViewControllers a bad idea? I have an iPad app and I seem to have encountered random malfunctions and sigbart errors.
These NSManageObjects come from CoreData, and it seems to me that sometimes they just lose memory and cause this. I was hoping to simply transfer them from controller to controller so as not to fetch on each view manager.
, . , (), NSManagedObjects VeiwControllers .
, ViewController refcount . .
, , ViewControllers,
@property (nonatomic, retain) NSManagedObject *yourObject;
, , :
self.yourObject = ...;
... :
otherViewController.yourObject = ...;
/ .
, . . , , . NSManagedObjects , , ( , ), .
, NSManagedObject, . - AppDelegate ObjectContext,
[[[UIApplication sharedApplication] delegate] managedObjectContext];
, retain, .
retain
Source: https://habr.com/ru/post/1778013/More articles:The Best Distance Metric Besides Levenshtein for Ordered Word Sets and Subsequent Clustering - algorithmНастройка внутренних свойств в составном WF4. Мероприятия во время разработки - wcfCalculation of the position and rotation of the Earth’s orbit - language-agnosticIs there any database model constructor that can output SQLAlchemy models? - pythonHow to register a Jackson provider with a Wink client? - javaReal-time data processing in Django / Python - djangoBest way to automate testing AI algorithms? - artificial-intelligenceExpressionEngine Templates: pass the plugin / module output as a parameter to another plugin / module - templatesCaching Fluent NHibernate ISessionFactory - nhibernatejava opengl: glDrawElements () s> 32767 vertices - javaAll Articles