diff --git a/cocos/ui/UIVideoPlayer-ios.mm b/cocos/ui/UIVideoPlayer-ios.mm index 1ef018e34d..248f6a285a 100644 --- a/cocos/ui/UIVideoPlayer-ios.mm +++ b/cocos/ui/UIVideoPlayer-ios.mm @@ -87,7 +87,7 @@ typedef NS_ENUM(NSInteger, PlayerbackState) { -(id)init:(void*)videoPlayer { if (self = [super init]) { - self.playerController = [AVPlayerViewController new]; + self.playerController = [[AVPlayerViewController new] autorelease]; [self setRepeatEnabled:FALSE]; [self showPlaybackControls:TRUE]; diff --git a/cocos/ui/UIWebView/UIWebViewImpl-ios.mm b/cocos/ui/UIWebView/UIWebViewImpl-ios.mm index 339797b8ab..0755809ed8 100644 --- a/cocos/ui/UIWebView/UIWebViewImpl-ios.mm +++ b/cocos/ui/UIWebView/UIWebViewImpl-ios.mm @@ -124,7 +124,7 @@ - (void)setupWebView { if (!self.wkWebView) { - self.wkWebView = [[WKWebView alloc] init]; + self.wkWebView = [[[WKWebView alloc] init] autorelease]; self.wkWebView.UIDelegate = self; self.wkWebView.navigationDelegate = self; }