On Apr 22, 2014, at 4:18 PM, Dave wrote:

> This is the main loop of the mainstay of the allocations, it runs this loop 
> around 650 times loading images of varying sizes:
> 
> myCount = [myURLArray count];
> LogIfDave(@"myURLArray: %@  Count: %i",myURLArray,myCount);
> for (myIndex = 0;myIndex < myCount;myIndex++)
>       {
>       myFileURLString = [myURLArray objectAtIndex:myIndex];
>       
>       myImage = [self commandDownloadImageWithFileURLString:myFileURLString];
>       if (myImage == nil)
>               {
>               LogIfDave(@"Download Failed: %i  Count: %i",myIndex,myCount);
>               continue;
>               }
> 
>       LogIfDave(@"Download Image: %i  Count: %i",myIndex,myCount);
>       }
> 
> I assumed that ARC would release myImage on each interation of the loop, 
> however, this seems not to be the case, since, I see a massive release when 
> the test conpletes and the Thread terminates.
> 
> Is this correct behaviour?

I understand that it is (or typically is). To get that behavior wrap the loop 
contents in an @autoreleasepool{}.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to