Last active
January 18, 2018 03:19
-
-
Save 1Cor125/4053996cec161946aa8c20a52cf17e56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(NSArray*)getArray | |
{ | |
// We are permitted to return the NSMutableArray since it is an NSArray but, since the | |
// the array is really mutable under the covers, it could be cast to that and mutated. | |
/* return mutableArray; */ | |
// Do an immutable copy before returning... | |
return [mutableArray copy]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment