Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit b4b44f2

Browse files
Fix memory leak in FlutterDarwinExternalTextureMetal (#28059)
1 parent 35ee8bd commit b4b44f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ - (instancetype)initWithTextureCache:(nonnull CVMetalTextureCacheRef)textureCach
3939
- (void)dealloc {
4040
CVPixelBufferRelease(_lastPixelBuffer);
4141
if (_textureCache) {
42+
CVMetalTextureCacheFlush(_textureCache, // cache
43+
0 // options (must be zero)
44+
);
4245
CFRelease(_textureCache);
4346
}
4447
}

0 commit comments

Comments
 (0)