I’m planning to do editable array of strings. so first I created the property:
@property (strong, nonatomic) NSMutableArray *history;
Then I made the lazy instatiation:
- (NSMutableArray *)history
{
if (!_history) _history=[NSMutableArray array];
return _history;
}
Now, when I just want to add an object to the array:
[self.history addObject:self.game.text]
(self.game.text is a NSString for that matter, but in Objective C I’m told it should receive any type of class)
and…even that simple method is not working. I’m not getting any error, it’s just the simulator that stays on black screen, and the screen witch tells “Theard 1: signal SIGABRT”
No idea how to even start fixing it…
(When I remark the following line as a comment, the app works fine. That simple line seems to be creating the problem)
Memory management, autoreleasing, weak-(property)-nesses and all this scary stuff that you haven’t even heard about because you’re living in the ARC dream.
To fix it: