From 15ac655571b832df3b7c7557b92f19cc5a36f5d8 Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 15 Nov 2019 11:39:49 +0800 Subject: [PATCH] manually maintain reference count (#20329) --- cocos/ui/UIVideoPlayer-ios.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/ui/UIVideoPlayer-ios.mm b/cocos/ui/UIVideoPlayer-ios.mm index 78be859e0d76..18e08e556c91 100644 --- a/cocos/ui/UIVideoPlayer-ios.mm +++ b/cocos/ui/UIVideoPlayer-ios.mm @@ -47,7 +47,7 @@ typedef NS_ENUM(NSInteger, PlayerbackState) { PlayerbackStateCompleted }; -@property (strong, nonatomic) AVPlayerViewController * playerController; +@property (assign, nonatomic) AVPlayerViewController * playerController; - (void) setFrame:(int) left :(int) top :(int) width :(int) height; - (void) setURL:(int) videoSource :(std::string&) videoUrl; @@ -87,7 +87,7 @@ @implementation UIVideoViewWrapperIos -(id)init:(void*)videoPlayer { if (self = [super init]) { - self.playerController = [[AVPlayerViewController new] autorelease]; + self.playerController = [AVPlayerViewController new]; [self setRepeatEnabled:FALSE]; [self showPlaybackControls:TRUE];