• 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
Re: leak in a sound function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: leak in a sound function


  • Subject: Re: leak in a sound function
  • From: Mohsan Khan <email@hidden>
  • Date: Sun, 23 Aug 2009 21:52:46 +0200

On 2009-08-23, at 20:37, Agha Khan wrote:

I also tried NSBundle* bundle = [[NSBundle mainBundle] retain];


Why are you trying to retain?
The documentation says "+ (NSBundle *)mainBundle" - its static and you didn't create (alloc, new) the *bundle instance, therefor you don't own it, and therefor should not release it either.


That is a bug in Mac files.


Don't just assume that there are alot of bugs in "Mac", rather there is a bug in your code/architecture.


If you really don't know what you are doing, please read the docs first - this might help you save alot of time when developing your app. Instead of the trial and error approach = $$$


Where did you find the Mac provided file "SoundEngine.cpp"?
And how old is this file i.e. when was this code written?
I searched my entire disk and didn't find this file, therefor it can't really be "Mac provided"...



/MK _______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >leak in a sound function (From: Agha Khan <email@hidden>)
 >Re: leak in a sound function (From: Kyle Sluder <email@hidden>)
 >Re: leak in a sound function (From: Agha Khan <email@hidden>)

  • Prev by Date: Re: Making an NSTableView Display Articles From An RSS Feed.
  • Next by Date: Re: Core Animation + Garbage Collection
  • Previous by thread: Re: leak in a sound function
  • Next by thread: Re: leak in a sound function
  • Index(es):
    • Date
    • Thread