retain/release problem from erikprice. Closes issue 1171.

git-svn-id: https://zxing.googlecode.com/svn/trunk@2197 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
smparkes@smparkes.net 2012-02-17 17:47:48 +00:00
parent e402d1ca92
commit 45abf6d9ec

View file

@ -409,10 +409,12 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
cropRect.size.width = ONE_D_BAND_HEIGHT;
// do a rotate
CGImageRef croppedImg = CGImageCreateWithImageInRect(capture, cropRect);
CGImageRelease(capture);
capture = [self CGImageRotated90:croppedImg];
capture = [self CGImageRotated180:capture];
// UIImageWriteToSavedPhotosAlbum([UIImage imageWithCGImage:capture], nil, nil, nil);
CGImageRelease(croppedImg);
CGImageRetain(capture);
cropRect.origin.x = 0.0;
cropRect.origin.y = 0.0;
cropRect.size.width = CGImageGetWidth(capture);