title: Correctly Releasing SystemSoundID
body: <p>I'm using <code>AudioToolbox</code> and <code>SystemSoundID</code> to load and play a sound.</p>
  
  <p>Here's my code in my <code>viewDidLoad</code> method:</p>
  
  <pre><code>NSString *swipeFilePath = [[NSBundle mainBundle] pathForResource:@"swipe" ofType:@"caf"];
  NSURL *swipeFileURL = [NSURL fileURLWithPath:swipeFilePath];
  AudioServicesCreateSystemSoundID((__bridge CFURLRef)swipeFileURL, &amp;swipe);
  </code></pre>
  
  <p>Every time I need it to play I do the following:</p>
  
  <pre><code>AudioServicesPlaySystemSound(swipe);
  </code></pre>
  
  <p>I know I must release it myself since it's not an obj-c object, but I'm not sure If I'm doing it correctly.</p>
  
  <p>What I did was the following, except it produced an error:</p>
  
  <pre><code>- (void)dealloc {
  AudioServiceDisposeSystemSoundID(swipe);
  }
  </code></pre>
  
  <p>Warning: <em>Implicit declaration of function 'AudioServiceDisposeSystemSoundID' is invalid in C99</em></p>
  
  <p>What's the appropriate way of releasing my sound?</p>