Re: What happens when I call NSMakeCollectable on a CFArrayRef?
Re: What happens when I call NSMakeCollectable on a CFArrayRef?
- Subject: Re: What happens when I call NSMakeCollectable on a CFArrayRef?
- From: mmalc crawford <email@hidden>
- Date: Sat, 19 Jan 2008 15:04:49 -0800
On Jan 19, 2008, at 2:56 PM, Andrew Thompson wrote:
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.
{CF,NS}MakeCollectable only apply to the argument:
<http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcCoreFoundation.html
>
mmalc
_______________________________________________
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