as question says, it dies at 7mb..
Is this normal? ( 7mb..)
instruments shows no leaks.
Thank you
- EDIT
edited 17mb -> 7mb. I lowered memory usage by taking out unnecessary pool I was allocating.
Still, it gets memory warning at 7 mb.. I'm essentially creating images and releasing them constantly when it gets the warning.
I'm doing a lot of
- (UIImage*) allocImage
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
UIImage* uiImage = [UIImage imageWithData: imageData];
UIImage* changedImage = [uiImage changeColor: self.currentColor];
uiImage = changedImage;
[uiImage retain];
[pool release];
return uiImage;
}
and releasing the uiImage I got (instruments shows memory goes up by 2-3 mb and goes back to 7mb)
Each image is 1mb big on memory, and I should probably have create/destroyed image about 100 times by the time the app gets the warning.
- Edit 2
found similar case, no solution there though..
My iphone app gets memory warning and killed at 6.8MB
Memory Warning but Small Live Bytes
Maybe I should move "creating UIImage" to c/c++ code? so that I don't have to worry about loading many images? Wonder if that's possible.
Or maybe use pool of memory for images since image size is all the same.