私はこのような可変配列をコピーしています:
//copy players' info into playerList from a dictionary
playerList = [[NSMutableArray alloc] initWithArray:[params objectForKey:@"p"] copyItems:YES];
配列内のアイテムは、次のようにcopyWithZoneを実装します。
- (id)copyWithZone:(NSZone *)zone
{
PlayerInfo* copy = [[[self class] allocWithZone:zone] init];
[copy setNick:[self nick]];
...
[copy setIsChallengedByMe:[self isChallengedByMe]];
return copy;
}
ただし、playerListには、「スコープ外」のオブジェクトしか含まれていないようです。私は何が間違っているのですか?