Yes, I can see the the rule for copy, I'm guessing it still makes a copy.

I'm a little confused as to what ( retain ) now does, does it now also do a 
copy, If I remove the ( copy ) I get
warning: default 'assign' attribute on property 'allImportHeaders' which 
implements 'NSCopying' protocol not appropriate with -fobjc-gc-only

so I'm unsure should I use the retain or copy keyword for the objects that 
conform to the 'NSCopying' protocol?

Also I was retaining IBOutlets before CG but I'm unsure what to do with them as 
they don't mind being assigned.

Thanks
Kevin

On 25/01/2011, at 11:03 PM, Thomas Davie wrote:

> 
> On 25 Jan 2011, at 09:59, Kevin Bracey wrote:
> 
>> Hi Guys,
>> 
>> I've been using Retain/Release up til now but I have started my first GC 
>> project.
>> 
>> In a Garbage Collected App when using the @property is it correct that I 
>> still have to specify (copy) or (retain) or have I missed something? I 
>> thought using GC didn't require retain and that everything could just be 
>> assigned, but the complier complains.
> 
> There is still a semantic difference between simply keeping hold of a 
> reference to something, and copying that something, even if you have a neat 
> tool keeping track of whether you still hold a reference.
> 
> Bob

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to