2018-08-06

2018-08-06  本文已影响8人  Gradlyarn
- (void)viewDidLoad
{
    [super viewDidLoad];
    //llvm编译器最后添加release,立即dealloc
    {
      Person *p1 = [[Person alloc] init];
    }
    NSLog(@"%s",__func__);
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    NSLog(@"%s",__func__);
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    NSLog(@"%s",__func__);
}

//结果:
2018-08-06 11:03:50.250280+0800 testDemo[51033:20420488] -[Person dealloc]
2018-08-06 11:03:50.250416+0800 testDemo[51033:20420488] -[ViewController viewDidLoad]
2018-08-06 11:03:50.250773+0800 testDemo[51033:20420488] -[ViewController viewWillAppear:]
2018-08-06 11:03:50.253934+0800 testDemo[51033:20420488] -[ViewController viewDidAppear:]
上一篇 下一篇

猜你喜欢

热点阅读