In didFinishLaunchingWithOptions, the first code is:
NSMutableArray *k = [[NSMutableArray alloc] initWithCapacity:10];
[k release];
(I reduced it to this case after much debugging) and I'm getting
*** -[__NSArrayM class]: message sent to deallocated instance 0x7576c90
*** -[__NSArrayM respondsToSelector:]: message sent to deallocated instance 0x7576c90
If I check the retainCount on 'k' after the alloc line, it is 1. If I replace NSMutableArray by NSArray everything is fine. What the heck is going on here??