Fix memory leak in FlutterDarwinExternalTextureMetal (flutter/engine#28059)

This commit is contained in:
ColdPaleLight
2021-08-24 22:59:02 +08:00
committed by GitHub
parent 54c9c08552
commit 2c71fa8e1b

View File

@@ -39,6 +39,9 @@ FLUTTER_ASSERT_ARC
- (void)dealloc {
CVPixelBufferRelease(_lastPixelBuffer);
if (_textureCache) {
CVMetalTextureCacheFlush(_textureCache, // cache
0 // options (must be zero)
);
CFRelease(_textureCache);
}
}