开发者

Can I add the same object to two different arrays?

Is this valid:

 NSObject anObject = [[NSObject alloc] init];
 [array1 addObject:anObject];
 [array2 addObject:anObject];

My money is on yes开发者_高级运维, since I'm only adding references to the same object, or am I wrong here?


Yes :) Dont forget to make it a mutable array

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜