我把自己的阶级从国家统计局的目标中总结出来。
-(void) parseRow:(NSDictionary*) dictionary {
NSArray* arName = [[dictionary valueForKey:displayname] componentsSeparatedByString:@"+"];
[self setDriverName:[arName objectAtIndex:0]];
[self setDriverSurname:[arName objectAtIndex:1]];
[arName release]; // this give problem!
}
并且我认为:
driverStats = [[DriverStats alloc] init];
// driverStats is declared in the header:
DriverStats* driverStats;
@property (nonatomic,retain) DriverStats* driverStats;
[driverStats parseRow:dictionary];
If I add [arName release] in my class, when I exit from parseRow method, I have the EXC_BAD_ACCESS error.... but it s wrong?? I used array and after I released... I think that the error will be if I didn t release the pointer.. or not??? thanks in advance