Re: "Potential" Leak of an Object Allocated...
Re: "Potential" Leak of an Object Allocated...
- Subject: Re: "Potential" Leak of an Object Allocated...
- From: David Duncan <email@hidden>
- Date: Mon, 17 Sep 2012 10:20:14 -0700
On Sep 16, 2012, at 3:45 PM, Philip McIntosh < email@hidden> wrote: I just installed XCode 4.3.1 and have done a couple of things to make an iPad app compatible with the new iPad retina display. No major changes to any of the code.
Just for the heck of it I ran Analyze and it came back with a bunch of instances of potential memory leaks for some sound files, specifically at lines like:
AudioServicesCreateSystemSoundID (alertSoundFileURLRef_,&alertSoundFileObject_);
It never had this problem before. These references are set when the app launches and checks to see which sound files to use for alerts depending on what preferences are set in the Settings app.
I would bet the problem is that you don't manage the lifetime of the audioSoundFileURLRef_, and the analyzer pointed to that line because it was the last reference to it in the code, not because it was the actual problem point.
In general you are going to need to provide actual context to code like this before anyone can really help, since the single line of code doesn't provide enough context.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden