NSInteger release
DetailViewController.h
@interface DetailViewController : UIViewController {
NSInteger getInteger;
NSNumber *getNumber;
}
@property (nonatomic, retain) NSNumber *getNumber;
@property (nonatomic, retain) NSInteger getInteger => Doesn't work with warning.
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 kno开发者_StackOverflow社区w about it.
NSInteger
is equivalent to int
(on iPhone). It is not an ObjC object. You won't and can't -retain
or -release
them.
NO ALLOC = NO DEALLOC.
精彩评论