Cause of big memory allocation (memory leak?) when reading UIImage from camera roll
问题 I try to modify FGallery (https://github.com/gdavis/FGallery-iPhone). I need it to read images from the camera roll, but I get memory leak. Old code (path is file location): @autoreleasepool { NSString *path = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] bundlePath],_thumbUrl]; _thumbnail = [UIImage imageWithContentsOfFile:path]; _hasThumbLoaded = YES; _isThumbLoading = NO; [self performSelectorOnMainThread:@selector(didLoadThumbnail) withObject:nil waitUntilDone:YES]; } My