From ec677cf77ad91abdca1b2a17e1746790ac441944 Mon Sep 17 00:00:00 2001 From: Linda Morton Date: Wed, 20 Dec 2017 15:02:38 -0800 Subject: [PATCH] Fix leak in GPUImageContext Leak was caused by unbalanced calls to CVOpenGLESTextureCacheCreate and CFRelease --- framework/Source/iOS/GPUImageContext.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/framework/Source/iOS/GPUImageContext.m b/framework/Source/iOS/GPUImageContext.m index c167d15d2..0238825f9 100755 --- a/framework/Source/iOS/GPUImageContext.m +++ b/framework/Source/iOS/GPUImageContext.m @@ -44,6 +44,12 @@ - (id)init; return self; } +- (void)dealloc { + if (_coreVideoTextureCache != NULL) { + CFRelease(_coreVideoTextureCache); + } +} + + (void *)contextKey { return openGLESContextQueueKey; }