• 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
What happens when I call NSMakeCollectable on a CFArrayRef?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What happens when I call NSMakeCollectable on a CFArrayRef?


  • Subject: What happens when I call NSMakeCollectable on a CFArrayRef?
  • From: Andrew Thompson <email@hidden>
  • Date: Sat, 19 Jan 2008 17:56:39 -0500

I want to call a Core function that returns a CFArrayRef and make the result garbage collectable.
The CFArray contains CFStrings...


Is this pattern OK?

-(NSArray *) doFoo {
  return NSMakeCollectable(CFCopyFoo(someArgs));
}

Where CFCopyFoo returns a new CFArray containing copied CFStrings.

Or do I have to iterate over the array and call NSMakeCollectable on each item in it?

AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside

	(see you later space cowboy, you can't take the sky from me)


_______________________________________________

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


  • Follow-Ups:
    • Re: What happens when I call NSMakeCollectable on a CFArrayRef?
      • From: "Clark Cox" <email@hidden>
    • Re: What happens when I call NSMakeCollectable on a CFArrayRef?
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Linking against HIServices?
  • Next by Date: Linking against HIServices?
  • Previous by thread: Re: Linking against HIServices?
  • Next by thread: Re: What happens when I call NSMakeCollectable on a CFArrayRef?
  • Index(es):
    • Date
    • Thread