Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.
Permalink
Browse files
8247464: Memory Leak in MTLBlitLoops_CopyArea() method
  • Loading branch information
aghaisas committed Jun 12, 2020
1 parent 12b63f5 commit 955a58a59bdb9717be5fa957945dafca99094004
Showing 1 changed file with 1 addition and 1 deletion.
@@ -824,7 +824,7 @@ jboolean clipDestCoords(

// Create an intrermediate buffer
int totalBuffsize = width * height * 4;
id <MTLBuffer> buff = [mtlc.device newBufferWithLength:totalBuffsize options:MTLResourceStorageModePrivate];
id <MTLBuffer> buff = [[mtlc.device newBufferWithLength:totalBuffsize options:MTLResourceStorageModePrivate] autorelease];

[blitEncoder copyFromTexture:dstOps->pTexture
sourceSlice:0 sourceLevel:0 sourceOrigin:MTLOriginMake(x, y, 0) sourceSize:MTLSizeMake(width, height, 1)

0 comments on commit 955a58a

Please sign in to comment.