开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜