Maybe you did better than me, and I don't have Xcode in my front end, but:
created object, link created:
AVAudioPlayer *newMusicPlayer = [[AVAudioPlayer alloc] initWithData:data error:&error];
this assignment, not distribution, do not save:
_musicPlayer = newMusicPlayer;
from the playMusicWithMusicData function, it will release newMusicPlayer , and this will cause my code to crash in another function when I use _musicPlayer . The analyzer tool was so rooted that I saved it, maybe released it too.
if you are using ios4 and not ARC this project.
in if branch:
[_musicPlayer stop]
I would check _musicPlayer so that it is not null, but that will not solve your problems.
I donβt know where it can be, if not in ios, and probably there will be:
Decided if you change the delegate instead of yourself.
_musicPlayer.delegate = self;
for any other class?
user529543
source share