Proper way to return an array
- by Ward
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