Large amounts of memory allocated on setImage:
问题 I have a UIImageView that was created programmatically ( [[UIImageView alloc] init] ). The app's memory stays in check until the setImage: method is called. Any thoughts? 回答1: I'm assuming you're setting your image to your image view using something like this: [imgV setImage:[UIImage imageNamed:@"yourImg.png"]] The problem with using that is that the app caches these images. If you'd like to avoid caching images, use imageWithContentsOfFile: : [imgV setImage:[UIImage imageWithContentsOfFile:[