关于此发布Why does 'self' protect memory space?,我使用'自我'访问aArray。然而,我仍然在didSelectRowAtIndexPath:方法中得到一个无效的对象。即使对自己,对象仍然autoreleased
在根控制器,我访问aArray这样的:
MyAppDelegate *theDelegate = [[UIApplication sharedApplication] delegate];
NSString *aKey = [theDelegate.aArray objectAtIndex:0];
将有事可做与aArray失去其参考?为什么它不会出现在cellForRowAtIndexPath中:(第一次使用它在MyAppDelegate之外)?
是的 - 我正在运行Clang。索引零处的对象是有效的。 – 4thSpace 2009-09-30 16:39:41
正在使用“分配”而不是“保留”。没有抓住它一段时间。问题解决了。 – 4thSpace 2009-10-01 01:35:43
所以我想不是过度释放,而是保留不足。 – 2009-10-08 20:37:06