From 93f339fb67df2934e618cfca0f9d5bd7982e4bcd Mon Sep 17 00:00:00 2001 From: ashawn Date: Sat, 23 Feb 2019 01:00:15 +0800 Subject: [PATCH] fix Memory leak when using PlatformView [IOS] #24714 (#7919) --- shell/platform/darwin/ios/ios_gl_render_target.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/platform/darwin/ios/ios_gl_render_target.mm b/shell/platform/darwin/ios/ios_gl_render_target.mm index 308c7a5a9..210d9a9d8 100644 --- a/shell/platform/darwin/ios/ios_gl_render_target.mm +++ b/shell/platform/darwin/ios/ios_gl_render_target.mm @@ -62,6 +62,7 @@ IOSGLRenderTarget::IOSGLRenderTarget(fml::scoped_nsobject layer, } IOSGLRenderTarget::~IOSGLRenderTarget() { + [EAGLContext setCurrentContext:context_]; FML_DCHECK(glGetError() == GL_NO_ERROR); // Deletes on GL_NONEs are ignored