MCQs>IT & Programming>Objective C>What does the following code do, assume ARC is enabled? NSArray *myArray; for (int i = 0; i < 10; i++){ @autoreleasepool { myArray = [[NSArray alloc]init]; } }
Objective C MCQs
What does the following code do, assume ARC is enabled? NSArray *myArray; for (int i = 0; i < 10; i++){ @autoreleasepool { myArray = [[NSArray alloc]init]; } }
Answer
Correct Answer: For each iteration of the loop a new array is allocated and released.
Explanation:
Note: This Question is unanswered, help us to find answer for this one