Skip navigation.
 
mlRe: Curious about copyWithZone message from NSArrayController in "GC required" project
FROM : Luke Evans
DATE : Sun Jan 13 23:48:52 2008

Hi Bill,

>First and foremost, -copyWithZone: has absolutely nothing to do with 

the differences between GC and non-GC.  As its name implies, it is all 
about copying an object, something that must be done in either GC or 
non-GC.

Makes sense.  I was wondering though if the fact I had a property 
declared on A to get the array of B's made a difference.  Reading the 
docs on properties highlights some differences between GC and non-GC, 
though from what you are saying, this should not effect a copy.

>So -- first question -- what is triggering the -copyWithZone: being 

sent to an instance of B in the first place?
Perhaps I need to take a look to see _exactly_ who is sending the 
copyWithZone message to B, but the only time I've had this manifest is 
when I've A's property that returns the array of B's bound as the 
content of the NSArrayController - which generates some UI for the 
list of B's.  I've used put B's on all manner of collections (arrays, 
sets) directly, with no hint of anybody calling "copyWithZone".

-- Lwe