I am a little concerned about building up a large amount of autoreleased objects on the iPhone. My application is only simple so it should not be an issue, but I just wanted to check that methods (like below) are correct and acceptable
-(NSNumber *)numberFromCore {
NSNumber *removedNumber = [[dataCore objectAtIndex:0] retain];
[dataCore removeObjectAtIndex:0];
return [removedNumber autorelease];
}
-(NSString *)coreSizeAsString {
NSString *coreSize = [NSString stringWithFormat:@"%d", [dataCore count]];
return coreSize;
}
Where possible I have used [[Class alloc] init]
and [Class release]
, but should I also be looking to change convienience methods like those above.
gary