下面的代码我在 Xcode 3.2 上使用并且运行良好
@interface MoObject : UIViewController
{
NSMutableArray *categoryArray;
}
@property (nonatomic, retain) NSMutableArray *categoryArray;
@end;
@implementation MyObject
@synthesize categoryArray;
- (void)viewDidLoad
{
[super viewDidLoad];
NSMutableArray *a = [[NSMutableArray alloc] init];
categoryArray = a;
[a release]; //AAA:I can not release this, it does not report compiling error , but after some operation, it will cause exec bad error
}
- (void)dealloc {
[category release];
[super dealloc];
}
我刚搬到 Xcode 4.3.1 iOS 5.1
相同的功能会导致很多 exec 错误。
即使我关闭了整个项目的 ARC。
问题依然存在,看来我无法在 AAA 点释放对象数组
欢迎任何评论