Proper way to return an array
Posted
by Ward
on Stack Overflow
See other posts from Stack Overflow
or by Ward
Published on 2010-03-21T18:40:58Z
Indexed on
2010/03/21
18:51 UTC
Read the original article
Hit count: 538
Hey there,
I never seem to get this right. I've got a method that returns a mutable array. What is the proper way to return the array and avoid potential memory leaks?
If I plan to store the results locally inside another view controller, does that affect the way the array should be returned?
Lastly, what if it's just an non-mutable array? Does that require a different technique?
thanks, Howie
© Stack Overflow or respective owner