fix memory leak (#20110) (#20214)

This commit is contained in:
minggo 2019-10-17 11:13:02 +08:00 committed by GitHub
parent fafd16e949
commit fae3ef8e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ typedef NS_ENUM(NSInteger, PlayerbackState) {
-(id)init:(void*)videoPlayer -(id)init:(void*)videoPlayer
{ {
if (self = [super init]) { if (self = [super init]) {
self.playerController = [AVPlayerViewController new]; self.playerController = [[AVPlayerViewController new] autorelease];
[self setRepeatEnabled:FALSE]; [self setRepeatEnabled:FALSE];
[self showPlaybackControls:TRUE]; [self showPlaybackControls:TRUE];

View File

@ -124,7 +124,7 @@
- (void)setupWebView { - (void)setupWebView {
if (!self.wkWebView) { if (!self.wkWebView) {
self.wkWebView = [[WKWebView alloc] init]; self.wkWebView = [[[WKWebView alloc] init] autorelease];
self.wkWebView.UIDelegate = self; self.wkWebView.UIDelegate = self;
self.wkWebView.navigationDelegate = self; self.wkWebView.navigationDelegate = self;
} }