project_files/HedgewarsMobile/Classes/UIImageExtra.m
changeset 3978 9660600e43cb
parent 3948 24daa33a3114
child 4356 d1d26f8963a3
equal deleted inserted replaced
3977:9df7b4812da9 3978:9660600e43cb
   136 
   136 
   137     // Create a new UIImage object
   137     // Create a new UIImage object
   138     UIImage *newImage = [UIImage imageWithCGImage:imageRef];
   138     UIImage *newImage = [UIImage imageWithCGImage:imageRef];
   139 
   139 
   140     // Release colorspace, context and bitmap information
   140     // Release colorspace, context and bitmap information
       
   141     CFRelease(imageRef);
       
   142     CGContextRelease(context);
   141     CGColorSpaceRelease(colorSpace);
   143     CGColorSpaceRelease(colorSpace);
   142     CGContextRelease(context);
       
   143     CFRelease(imageRef);
       
   144 
   144 
   145     // Return the new grayscale image
   145     // Return the new grayscale image
   146     return newImage;
   146     return newImage;
   147 }
   147 }
   148 
   148