本帖最后由 Mike001 于 2015-4-22 10:56 编辑
Xcode 6.2中使用ARC时,调用dealloc有啥需要注意的吗?我的为啥不能调用呢?
#import <Foundation/Foundation.h>
#import "Person.h"
int main()
{
@autoreleasepool {
Person *p = [[Person alloc] init];
p.age = 10;
NSLog(@"The age of the person is %d",p.age);
}
return 0;
}
#import "Person.h"
@implementation Person
- (void)delloc
{
NSLog(@"This person has been recycled");
}
@end
|
|