I'm trying to get my mind around one aspect of memory management in the iPhone SDK.
If I ran:
for (int x = 0; x < 10; x++) {
NSMutableArray *myArray = [[NSMutableArray alloc] init];
}
Am I creating 10 myArray objects in memory, or does each alloc overwrite the previous? If the latter, I presume I would only need one [myArray release] after the loop to clean up. If the former, I presume I need the release inside the For loop.
Thanks.