I'm working on a soundboard app, and when I analyze my app, it always detects memory leaks. It works fine on the iOS Simulator, but most sounds do not work on the actual device. I think it has to do with the memory leaks. Any tips. Here is the code. It's only a snippet of all of the code. I am using the AudioToolbox. Sorry, and thanks ahead, I am a very new beginner.
#import "hilarioussoundboardipViewController.h"
@implementation hilarioussoundboardipViewController
-(IBAction)sound2 {
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundFileURLRef;
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"sound2", CFSTR ("wav"), NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
AudioServicesPlaySystemSound(soundID); //it says there is a potential memory leak here//
}