I have tried to initialize my NSMutableArray 100 ways from Sunday, and NOTHING is working for me. I tried setting it equal to a newly allocated and initialized NSMutableArra
As I was proof reading my post, a thought occurred to me and I answered my own question. This resolution was obscure enough that I decided to go ahead, create the post and answer it myself (so any other newbies, like myself, won't get hung up).
My mistake was in...
@property (copy) NSMutableArray *array;
it should have been...
@property (retain) NSMutableArray *array;
The error was not happening in the way I was executing my code, but rather in the way the anObject was attempting to "copy" the NSMutableArray array.
As we all know...
mutableArray = [mutableArray copy];
is not always (or ever, in my experience) equal to...
mutableArray = [mutableArray mutableCopy];
And this was the source of my problem. By simply switching the @property from (copy) to (retain) I solved my problem.