Closed ghost closed 8 years ago
I save token with next method
- (void)newsSource:(id <LRNewsSource>)source didReceiveNewPageToken:(NSString *)token { [MagicalRecord saveWithBlock:^(NSManagedObjectContext * _Nonnull localContext) { LRNewsSourcePagination *pageToken = [LRNewsSourcePagination MR_findFirstOrCreateByAttribute:@"newsSourceType" withValue:@(source.type) inContext:localContext]; pageToken.newPageToken = token; }]; }
after relaunch get value like this
- (LRNewsSourcePagination *)newsSourceDidRequestPageToken:(id <LRNewsSource>)source { LRNewsSourcePagination *pageToken = [LRNewsSourcePagination MR_findFirstByAttribute:@"newsSourceType" withValue:@(source.type)]; return pageToken; }
Result - first time when value read from DB all work normally, but when next time app want to read value from instance - instance var become zombie object. So strange. All properties which store a value are strong. Need some advice or help.
screen from zombie inspector https://www.dropbox.com/s/p9pk4gidqq0b9q4/Screenshot%202016-02-03%2017.45.26.png?dl=0
I save token with next method
after relaunch get value like this
Result - first time when value read from DB all work normally, but when next time app want to read value from instance - instance var become zombie object. So strange. All properties which store a value are strong. Need some advice or help.
screen from zombie inspector https://www.dropbox.com/s/p9pk4gidqq0b9q4/Screenshot%202016-02-03%2017.45.26.png?dl=0