I have seen it done both ways but I am not really sure what the difference is. Here is both scenarios:
Outside of fast enumeration loop:
NSDate *date;
for(date in array)
{
//
}
Inside of fast enumeration loop:
for(NSDate *date in array)
{
//
}
If I had to guess, the 2nd scenario would be more expensive on memory if it is creating a new NSDate pointer for every iteration of the loop? Or is that not what is happening?