mirror of
https://github.com/zxing/zxing.git
synced 2025-01-13 20:27:34 -08:00
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:
parent
e402d1ca92
commit
45abf6d9ec
|
@ -409,10 +409,12 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||||
cropRect.size.width = ONE_D_BAND_HEIGHT;
|
cropRect.size.width = ONE_D_BAND_HEIGHT;
|
||||||
// do a rotate
|
// do a rotate
|
||||||
CGImageRef croppedImg = CGImageCreateWithImageInRect(capture, cropRect);
|
CGImageRef croppedImg = CGImageCreateWithImageInRect(capture, cropRect);
|
||||||
|
CGImageRelease(capture);
|
||||||
capture = [self CGImageRotated90:croppedImg];
|
capture = [self CGImageRotated90:croppedImg];
|
||||||
capture = [self CGImageRotated180:capture];
|
capture = [self CGImageRotated180:capture];
|
||||||
// UIImageWriteToSavedPhotosAlbum([UIImage imageWithCGImage:capture], nil, nil, nil);
|
// UIImageWriteToSavedPhotosAlbum([UIImage imageWithCGImage:capture], nil, nil, nil);
|
||||||
CGImageRelease(croppedImg);
|
CGImageRelease(croppedImg);
|
||||||
|
CGImageRetain(capture);
|
||||||
cropRect.origin.x = 0.0;
|
cropRect.origin.x = 0.0;
|
||||||
cropRect.origin.y = 0.0;
|
cropRect.origin.y = 0.0;
|
||||||
cropRect.size.width = CGImageGetWidth(capture);
|
cropRect.size.width = CGImageGetWidth(capture);
|
||||||
|
|
Loading…
Reference in a new issue