My program has a memory leak

前端 未结 5 1932
孤独总比滥情好
孤独总比滥情好 2021-01-16 22:17
-(IBAction)play2;

{
    CFBundleRef mainBundle = CFBundleGetMainBundle();
    CFURLRef soundFileURLRef;
    soundFileURLRef =CFBundleCopyResourceURL(mainBundle, 
           


        
5条回答
  •  北海茫月
    2021-01-16 23:11

    AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID); - leak here, because create added to retain count

    use AudioServicesDisposeSystemSoundID after playing sound

提交回复
热议问题