Hello,
I have been using the most excellent Accessorizer to auto-magically generate setters/getters for my Obj-C code in Xcode. Recently a change was made in Accessorizer:
old version of Accessorizer:
@property (nonatomic, retain) NSMutableSet *setA;
@property (nonatomic, retain) NSMutableSet *setB;
new version of Accessorizer:
@property (nonatomic, copy) NSMutableSet *setA;
@property (nonatomic, copy) NSMutableSet *setB;
Sadly, the new version crashes my code. In my code I do the following:
self.setA = [[[NSMutableSet alloc] init] autorelease];
self.setB = [[[NSMutableSet alloc] init] autorelease];
// ...
[self.setA minusSet:self.setB];
The above line of code works fine using the old way (retain) but crashes using the new way (copy). Clearly something is wrong here. I rely on Accessorizer extensively. Could someone please clarify the implications of using copy/retain in the context of NSMutableSet?
Thanks,
Doug