Skip navigation.
 
mlWhat happens when I call NSMakeCollectable on a CFArrayRef?
FROM : Andrew Thompson
DATE : Sat Jan 19 23:56:39 2008

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)

Related mailsAuthorDate
mlWhat happens when I call NSMakeCollectable on a CFArrayRef? Andrew Thompson Jan 19, 23:56
mlRe: What happens when I call NSMakeCollectable on a CFArrayRef? mmalc crawford Jan 20, 00:04
mlRe: What happens when I call NSMakeCollectable on a CFArrayRef? Clark Cox Jan 20, 00:17
mlRe: What happens when I call NSMakeCollectable on a CFArrayRef? Andrew Thompson Jan 20, 18:42
mlRe: What happens when I call NSMakeCollectable on a CFArrayRef? Clark Cox Jan 20, 19:30