• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
"Potential" Leak of an Object Allocated...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Potential" Leak of an Object Allocated...


  • Subject: "Potential" Leak of an Object Allocated...
  • From: Philip McIntosh <email@hidden>
  • Date: Sun, 16 Sep 2012 16:45:26 -0600

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 have not loaded it on a device yet to run it in instruments, but is there a chance this is not a memory leak at all?

Since I don' think playing the sounds with AudioServicesPlaySystemSound (alertSoundFileObject_); increases the reference count I don't really see a problem with having the reference count set at 1 after the setAlertSounds method is run. True?
 _______________________________________________
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

  • Follow-Ups:
    • Re: "Potential" Leak of an Object Allocated...
      • From: David Duncan <email@hidden>
    • Re: "Potential" Leak of an Object Allocated...
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Adding externally managed sources to a project
  • Next by Date: Re: "Potential" Leak of an Object Allocated...
  • Previous by thread: Re: Adding externally managed sources to a project
  • Next by thread: Re: "Potential" Leak of an Object Allocated...
  • Index(es):
    • Date
    • Thread