project_files/HedgewarsMobile/Classes/MapConfigViewController.m
changeset 3598 a8aa06bae895
parent 3547 02875b1145b7
child 3623 f14db208f2fa
equal deleted inserted replaced
3597:978c30ef50fc 3598:a8aa06bae895
   114     CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceGray();
   114     CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceGray();
   115     CGContextRef bitmapImage = CGBitmapContextCreate(mapExp, 256, 128, 8, 256, colorspace, kCGImageAlphaNone);
   115     CGContextRef bitmapImage = CGBitmapContextCreate(mapExp, 256, 128, 8, 256, colorspace, kCGImageAlphaNone);
   116     CGColorSpaceRelease(colorspace);
   116     CGColorSpaceRelease(colorspace);
   117     
   117     
   118     CGImageRef previewCGImage = CGBitmapContextCreateImage(bitmapImage);
   118     CGImageRef previewCGImage = CGBitmapContextCreateImage(bitmapImage);
       
   119     CGContextRelease(bitmapImage);
   119     UIImage *previewImage = [[UIImage alloc] initWithCGImage:previewCGImage];
   120     UIImage *previewImage = [[UIImage alloc] initWithCGImage:previewCGImage];
   120     CGImageRelease(previewCGImage);
   121     CGImageRelease(previewCGImage);
   121     previewCGImage = nil;
   122     previewCGImage = nil;
   122 
   123 
   123     // set the preview image (autoreleased) in the button and the maxhog label on the main thread to prevent a leak
   124     // set the preview image (autoreleased) in the button and the maxhog label on the main thread to prevent a leak