Re: How do I release multiple instance of AVAudioPlayer
Re: How do I release multiple instance of AVAudioPlayer
- Subject: Re: How do I release multiple instance of AVAudioPlayer
- From: David Duncan <email@hidden>
- Date: Sun, 25 Jul 2010 10:01:45 -0700
On Jul 25, 2010, at 9:38 AM, Sanoj Nambi wrote: I guess AVAudioPlayer internally maintains a pool and flushes it if a certain number of objects are created.
I think you are making an unwarranted assumption here... playBeat = [[[AVAudioPlayer alloc] initWithContentsOfURL:filePath error:&error]retain];
This is almost certainly incorrect. You should almost never be retaining the object you get back from a +alloc method, as it is already owned by you.
I have not released the playBeat object anywhere.
If you never release your owning reference to the AVAudioPlayers, then how do you expect them to be released at all?
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.
David Duncan
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden