美文网首页
2018-08-06

2018-08-06

作者: Gradlyarn | 来源:发表于2018-08-06 10:59 被阅读8次
    - (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:]
    

    相关文章

      网友评论

          本文标题:2018-08-06

          本文链接:https://www.haomeiwen.com/subject/bhuwvftx.html