I'm having trouble with an iPad app that I'm making
the code looks the same (this is a UIView subclass subclass):
- (id) Init {UIImage * theImage = [UIImage imageNamed: @ "chart0075.jpg"]; // frames CGRact lageframe = CGRact make (20, 130, IIMAG size.width, IIMAG size.height); // Set new frame CGFloat newHeight = theImage.size.height / 1.65; CGFloat newWidth = theImage.size.width / 1.65; CGF FTPMFFrame = CGRactMake (480, 200, NewWeather, NewHead); Self = [super initWithLargeFrame: lgeFrame smallFrame: smlFrame]; If (self) {/} adds the image as an image view, IMAGEView = [[UIImageView alloc] initWithImage: theImage]; [Image view setframe: CGRactMake (0, 0, selffame size.width, selffame-size.hit)]; [Image view setautorizingmask: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight]; [Self-ed. Sview: imageview]; // Now we need to create an array of images for image sequence NSMutableArray * imageSeq = [NSMutableArray array]; For (int i = 1; i Then it is believed to animate the image on a reverse pinch gesture. For the first time when I point to this reverse pinch, it takes a few seconds to start the animation. And sometimes I get the memory alert level 1 and the app crashes.
What's the problem here? Is there a lot of 80 jpg in memory at a time? They are completely under 2 MB, so they definitely should not fill the iPad's storage right?
I have seen it with an allocation tool which is suggesting that I have around 40km of memory time, but then it goes below 0 during subsequent animation. (Although the allocation tool makes me a little confused).
Does anyone know what is the reason for this? Can I post more code or anything if necessary?
Thank you very much :)
Your memory usage depends on this That's how big the images are uncompressed. Height time width 4 will tell you the number of bytes that will take each of the images, in total by multiplying the number of images.
My guess is that you are on the edge of being more than memory wise.
Run in devices with the VMTracker tool to make sure. You should consider Dirty Resident Memory.
Both the WWDC '10 and WWDC '09 had very good content on device and memory usage analysis.
Comments
Post a Comment