Yes, I know that my problem is not the unique, but I have analysed many source codes but nothing works well. I am creating an array of 100 images which will be used for UIImageView animation and after finishing animation I want to free the memory.
.h
IBOutlet UIImageView* 1mage;
.m
NSMutableArray* 1mageArray = [[NSMutableArray alloc]initWithCapacity:99];
for (int i=1; i<=100; i++) { [1mageArray addObject:[UIImage imageNamed:[NSString stringWithFormat:@"1mage_%.4d.png",i]]]; }
1mage.animationImages = 1mageArray;
1mage.animationDuration = 8.0;
1mage.animationRepeatCount = 0;
[1mage startAnimating];
[1mageArray release];
I have read Memory Management Guide, and seems, like I am doing everything okay, but debugger does not agree with me, and after playing the animation I still have 60 MB used.
Thanks in advance!
copy/paste , and I shorted variables by replacing the long text with 1. do not pay attention on this!