And again my array of arrays ....
When I have an array "x" that contains multiple instances of an array "y", how do I clear/release it without risking memory leaks?
are the following calls sufficient?
(a) clearing the array
[x removeAllObjects];
(b) releasing the array
[x release];
or do I need to enumerate the array, such as:
(c) clearing the array
for(int i=0;i<x.count;i++)
[[x objectAtIndex:i] release];
[x removeAllObjects];
(d) releasing the array
for(int i=0;i<x.count;i++)
[[x objectAtIndex:i] release];
[x release];
thanks in advance