• 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: Bundles, CFStrings and release/retain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bundles, CFStrings and release/retain


  • Subject: Re: Bundles, CFStrings and release/retain
  • From: Bill Stewart <email@hidden>
  • Date: Wed, 20 Aug 2003 21:53:57 -0700

On Wednesday, August 20, 2003, at 06:28 AM, John Pitcairn wrote:

I would really recommend just taking the time to read at least the general
CoreFoundation documentation:

Yes, I've certainly paid some attention to the CF docs, but being rather new to this it takes a while to grasp even basic concepts. I'll definitely have another read through with particular reference to the sections you mention.

The short answer to your questions is: If you don't release when you
should, you will leak memory. If you release when you shouldn't, you will
probably cause crashes. If you read the CoreFoundation docs, you will
learn how to use CoreFoundation properly and prevent both of those
problems. :)

Fair enough. I appreciate a little knowledge is a dangerous thing. Still, I was hoping for an example so I can relate the documentation to release as used in an actual working AU, given that the SampleEffectUnit doesn't release anything...

The Sample AU's use of CF objects are to create static reps of the param names (thus, they live for the life of the process the effect is loaded in)

Any property that contains a CF object is given a new CF object (See the presets array example)... basically any CF object an AU returns is the responsibility of the host to release - the exception to this is the parameter names themselves, where there is a conditional release.

I'd recommend reading my recent posts about this and the changes/clarifictions on this semantic

Bill


-- John Pitcairn

----------------------------------------------------------------------- ---
Revolver Design | Opus Locus | Auckland, New Zealand
http://www.revolver.co.nz/forsale.phtml - updated 8 August 2003
----------------------------------------------------------------------- ---
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


--
mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Bundles, CFStrings and release/retain (From: John Pitcairn <email@hidden>)

  • Prev by Date: Re: Sequence position display
  • Next by Date: Re: Core Audio for a Game Engine
  • Previous by thread: Re: Bundles, CFStrings and release/retain
  • Next by thread: Core Audio for a Game Engine
  • Index(es):
    • Date
    • Thread