Made it so we clean up gl resources when view controllers get deleted. (flutter/engine#13396)

This commit is contained in:
gaaclarke 2019-10-29 16:09:14 -07:00 committed by GitHub
parent 3c497a831e
commit 7cdf36bc7f

View File

@ -203,6 +203,11 @@ NSString* const FlutterDefaultDartEntrypoint = nil;
- (void)notifyViewControllerDeallocated {
if (!_allowHeadlessExecution) {
[self destroyContext];
} else {
flutter::PlatformViewIOS* platform_view = [self iosPlatformView];
if (platform_view) {
platform_view->SetOwnerViewController({});
}
}
_viewController.reset();
}