在 didFinishLaunchingWithOptions 中,第一个代码是:
NSMutableArray *k = [[NSMutableArray alloc] initWithCapacity:10];
[k release];
(经过多次调试,我将其简化为这种情况)并且我得到了
*** -[__NSArrayM class]: message sent to deallocated instance 0x7576c90
*** -[__NSArrayM respondsToSelector:]: message sent to deallocated instance 0x7576c90
如果我在 alloc 行之后检查'k'上的 retainCount,它是 1。如果我用 NSArray 替换 NSMutableArray 一切都很好。这到底是怎么回事??