views:

179

answers:

2
DetailViewController.h   

 @interface DetailViewController : UIViewController {

 NSInteger getInteger;
 NSNumber *getNumber;

 }
 @property (nonatomic, retain) NSNumber *getNumber;
 @property (nonatomic, retain) NSInteger getInteger => Doesn't work with warning.

hi, guys. I have a question about NSInteger. I know that NSNumber is able to release. so, I add code like this.

DetailViewController.m
@synthesize getNumber;
...
...
- dealloc{
  [getNumber release];
} 

But How to release NSInteger ? Doesn't it require release ? I don't know about it. Please, Help me.

+3  A: 

NSInteger is equivalent to int (on iPhone). It is not an ObjC object. You won't and can't -retain or -release them.

KennyTM
Ok, Tank you very much!
Beomseok
+1  A: 

NO ALLOC = NO DEALLOC.

CastroAPZ
Oh, I see. Thank you!
Beomseok