NSArray storing MutableArrays

Discussion in 'Mac Programming' started by larswik, May 19, 2015.

  1. larswik macrumors 68000

    Sep 8, 2006
    Quick question, I don't think I need to post code. I understand NSArrays can not be changed. But if I create an NSArray that contains NSMutableArrays, am I able to change the data in the MutableArrays, or is everything immutable since it is stored in an NSArray?
  2. mfram macrumors 65816

    Jan 23, 2010
    San Diego, CA USA
    Yes, you can change the mutable arrays in the wrapper array. NSArray doesn't know what they are other than some NSObject.
  3. larswik thread starter macrumors 68000

    Sep 8, 2006
    Thanks, tracking down some code problems and wanted to eliminate that as a possible problem.

Share This Page