0
DetailViewController.h
@interface DetailViewController : UIViewController {
NSInteger getInteger;
NSNumber *getNumber;
}
@property (nonatomic, retain) NSNumber *getNumber;
@property (nonatomic, retain) NSInteger getInteger => Doesn't work with warning.
我知道NSNumber的是能夠釋放。所以,我添加這樣的代碼:NSInteger的釋放
DetailViewController.m
@synthesize getNumber;
...
...
- dealloc{
[getNumber release];
}
但是如何釋放NSInteger?它不需要釋放嗎?我不知道。