ARCが有効になっています。計測器がメモリ リークを示しています。解決策はありますか?
これが私のコードです:
- (void) onPlayButtonClicked
{
NSString *title = @"Pause";
if (isPlay) {
[player stop];
player.delegate = nil;
title = @"Play";
}
else
{
player = [[ReaderGlobals audioPlayer] initWithContentsOfURL:mSoundPath error:nil];
player.delegate = self;
[player play];
}
isPlay ^= true;
[mButtonPlay setTitle:title forState:UIControlStateNormal];
}
ReaderGlobals
シングルトンクラスであり[ReaderGlobals audioPlayer]
、単一のインスタンスを返しますAVAudioPlayer