fix Memory leak when using PlatformView [IOS] #24714 (flutter/engine#7919)

This commit is contained in:
ashawn 2019-02-23 01:00:15 +08:00 committed by Amir Hardon
parent 43a9d65b97
commit 3ef46f5b11

View File

@ -62,6 +62,7 @@ IOSGLRenderTarget::IOSGLRenderTarget(fml::scoped_nsobject<CAEAGLLayer> layer,
}
IOSGLRenderTarget::~IOSGLRenderTarget() {
[EAGLContext setCurrentContext:context_];
FML_DCHECK(glGetError() == GL_NO_ERROR);
// Deletes on GL_NONEs are ignored