Skip to content

Instantly share code, notes, and snippets.

@1Cor125
Last active January 18, 2018 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1Cor125/4053996cec161946aa8c20a52cf17e56 to your computer and use it in GitHub Desktop.
Save 1Cor125/4053996cec161946aa8c20a52cf17e56 to your computer and use it in GitHub Desktop.
-(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