Reputation: 1
I have a class which contains single NSInteger property
@interface myTag
@property (nonatomic) NSInteger tag;
@property (nonatomic) NSInteger index;
@end
I using it in code like
mytag = [[myTag alloc] init];
int num = (int)mytag.tag;
[mytag release];
NSLog(@"num = %d",num);
my questions are
But if I not call release, the Xcode analyzer warns me about memory leak
Upvotes: 0
Views: 422
Reputation: 34265
Also your third question, you are asking about mytag variable, which is not NSInteger, but an instance of myTag class..
A small advice for you, before jumping into projects , please take some time to read objective C memory management basics (which are not so easy, I must say)..Apple documentation is a good place to start..this tutorial is very informative about ARC..
Upvotes: 1