UIViewController retain count problem

前端 未结 4 1252
我寻月下人不归
我寻月下人不归 2021-01-25 16:11

I am creating a new UIViewController with the below code

GameViewController *temp = [[GameViewController alloc] initWithNibName:@\"GameViewController\" bundle:ni         


        
4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-25 16:39

    In GameViewController have you released your background music as

    - (void)viewDidLoad{
       //Other nils
       self.backgroundMusic = nil;
    }
    - (void)dealloc{
        //Other releases
        [backgroundMusic release];
        [super dealloc];
    }
    

提交回复
热议问题