Monday 15 April 2013

ios - NSMutableArray behaviour with ARC -


ARC is enabled when adding an object (such as Object X) to a NSMUtABRA, if that object X is somewhere in the code And what is changed is "copy" inside NSMutableArray should also be updated?

Does NSMutableArray only refer to the indicator of the original object?

If this is a copy If you added it as a reference, yes it is just a pointer for this object so that any object changes in the objects context in the object context will apply.

Do not be confused with the NSMUtable part of the array. The only thing that happens with the normal NSArray is: If you change the object, then the object will be referenced in the array. The volatile part applies only to the array, not the object in the array.

No comments:

Post a Comment