mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #7178 from valeriyvan:iosfixes
* Changes delegate property from assign to weak In modern Objective-C delegate should be weak. In very rare conditions you might want delegate be strong. Assign for delegate is sign of legacy code. This change prevents crash when you forget nil delegate in dealloc and makes rush with nilling delegate unnecessary. This change shouldn't break any existing code. * Adds implementation for setters and getters for weak delegate properties for non ARC Obj-C files For whatever reason compiler can't synthesize these. And yes, it's time to convert all Objective-C stuff to ARC.
This commit is contained in:
committed by
Alexander Alekhin
parent
473dba1189
commit
f1dcf71dd7
@@ -133,7 +133,7 @@
|
||||
|
||||
}
|
||||
|
||||
@property (nonatomic, assign) id<CvVideoCameraDelegate> delegate;
|
||||
@property (nonatomic, weak) id<CvVideoCameraDelegate> delegate;
|
||||
@property (nonatomic, assign) BOOL grayscaleMode;
|
||||
|
||||
@property (nonatomic, assign) BOOL recordVideo;
|
||||
@@ -167,7 +167,7 @@
|
||||
AVCaptureStillImageOutput *stillImageOutput;
|
||||
}
|
||||
|
||||
@property (nonatomic, assign) id<CvPhotoCameraDelegate> delegate;
|
||||
@property (nonatomic, weak) id<CvPhotoCameraDelegate> delegate;
|
||||
|
||||
- (void)takePicture;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user