title: AVAudioPlayer memory leaks
body: <p>I have this method in an exterior class that gets called whenever the charachter in my game hits a wall (about once every 5 seconds on average). I dont understand it. I thaught I was on top of the memory management. Everytime the method is called, a small amount of memory is leaked (Malloc 38 or 42 bytes) This keeps happening, and the game freezes up. Here is my code:</p>
  
  <pre><code>-(void)playBoing {
      int x = (arc4random()%3)+1;
      NSString *path = [NSString stringWithFormat:@"/boing_0%i.aif", x];
  
      NSString* resourcePath = [[NSBundle mainBundle] resourcePath];
      resourcePath = [resourcePath stringByAppendingString:path];
  
      if (boing != nil) {
          boing = nil;
          boing.delegate = nil;
          [boing release];
      }
      boing = [[AVAudioPlayer alloc] initWithContentsOfURL:
               [NSURL fileURLWithPath:resourcePath] error:nil];
  
      boing.delegate = self;
      boing.volume = 1;
      [boing play];
  }
  </code></pre>