Skip to content

Commit d0e164f

Browse files
committed
Merge pull request phonegap#900 from markus-olsson/avsession-leak
Fix for memory warnings due to AVCaptureSession leak
2 parents fb7c945 + c8a1273 commit d0e164f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iOS/BarcodeScanner/CDVBarcodeScanner.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ - (void)barcodeScanCancelled {
300300
- (NSString*)setUpCaptureSession {
301301
NSError* error = nil;
302302

303-
AVCaptureSession* captureSession = [[AVCaptureSession alloc] init];
303+
AVCaptureSession* captureSession = [[[AVCaptureSession alloc] init] autorelease];
304304
self.captureSession = captureSession;
305305

306306
AVCaptureDevice* device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];

0 commit comments

Comments
 (0)