diff --git a/framework/Source/Camera.swift b/framework/Source/Camera.swift index 137f3dce..548444de 100644 --- a/framework/Source/Camera.swift +++ b/framework/Source/Camera.swift @@ -2,7 +2,7 @@ import Foundation import AVFoundation import Metal -public protocol CameraDelegate { +public protocol CameraDelegate:class { func didCaptureBuffer(_ sampleBuffer: CMSampleBuffer) } @@ -57,7 +57,7 @@ public class Camera: NSObject, ImageSource, AVCaptureVideoDataOutputSampleBuffer public var logFPS:Bool = false public let targets = TargetContainer() - public var delegate: CameraDelegate? + public weak var delegate: CameraDelegate? public let captureSession:AVCaptureSession public var orientation:ImageOrientation? public let inputCamera:AVCaptureDevice!