Releasing System sounds

Apprentice
Posts: 17
Joined: 2010.01
Post: #1
I need help!!!!!! I have 4 view controllers and each one has it's own XIB, and each view controller has 4 system sounds and I need to know how to release them I am creating them by using this code:

NSURL *filePath4 = [NSURL fileURLWithPath:path4 isDirectory:NO];
AudioServicesCreateSystemSoundID((CFURLRef)filePath4, &DogBark);

And I have declared "DogBark" in the .H file And I need to know how to release it.

I have tried using this code in the "dealloc" method:
AudioServicesDisposeSystemSoundID (DogBark);

But I put an NSLog statement in this method and it is not showing that it is being invoked. What do I need to do?
Quote this message in a reply
⌘-R in Chief
Posts: 1,260
Joined: 2002.05
Post: #2
Well, this has nothing to do with the sound at all. Your view controller isn't being deallocated. When are you expecting it to be?
Quote this message in a reply
Apprentice
Posts: 17
Joined: 2010.01
Post: #3
So what do I need to do!
Quote this message in a reply
Apprentice
Posts: 17
Joined: 2010.01
Post: #4
So what do I need to do! How do I need to release my viewcontrollers!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Releasing MacSteve85 4 3,659 Feb 8, 2010 01:52 PM
Last Post: cmiller
  Creating system sounds MacSteve85 3 2,343 Jan 30, 2010 11:34 AM
Last Post: AnotherJake