两种写法,为什么第二种就总崩溃呢

CHDiscountDetailView *xin = [[CHDiscountDetailView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];

    self.view = xin;

    self.discountDetailView = xin;

    [xin release];

    

    

    //不知道 为什么这样定就总会崩溃,上边的话没事

    self.discountDetailView = [[[CHDiscountDetailView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)]autorelease];

    [self.view addSubview: self.discountDetailView];

    [discountDetailView release];

你可能感兴趣的:(两种写法,为什么第二种就总崩溃呢)